You are here

Run file instead of exe in NSIS?

6 posts / 0 new
Last post
Last seen: 13 years 3 months ago
Joined: 2007-04-05 12:34
Run file instead of exe in NSIS?

Hey all,
I want to know if there's a way to launch another file extension besides .exe (right now I'd like .mdb). Is there another function besides ExecWait I can do this with??

Here's my current code:
BTW: I'm making my splash screens for files, this one's for our church database.

Name "Myname"
OutFile "MyOutput.exe"
Caption "Mycaption"

Icon "Myicon.ico"

CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user

Section "Main"
			;=== Show the splash screen while processing registry entries
			File /oname=$PLUGINSDIR\splash.jpg "MySplashScreen.jpg"
			newadvsplash::show /NOUNLOAD 4000 200 0 -1 /L $PLUGINSDIR\splash.jpg

		ExecWait "someprog.exe"

[Moderator RM: Use <pre> instead of <code> for code blocks. I fixed for you]
[Thanks Ryan, I had just figured out how to do that, and then came back and it was changed! Thanks.]

John T. Haller
John T. Haller's picture
Last seen: 13 sec ago
Joined: 2005-11-28 22:21

It's shell run or something similar to that. The issue, of course, is that the given OS must have a file association for MDB (most of which won't as most PCs don't have access installed).

Sometimes, the impossible can become possible, if you're awesome!

Last seen: 13 years 3 months ago
Joined: 2007-04-05 12:34
Fine if it doesn't

I'm just making this for one comp, I won't put it on any without access...thing is, I'd like to be able to do this without having to make a separate file launcher exe. BTW, it needs to work on '98. Thanks

Last seen: 11 years 9 months ago
Joined: 2006-12-12 12:00
You can always use the thing

You can always use the thing that's the best and the worst in NSIS. Shell plugin.
The best - you can write everything in it.
The worst - it's often faster to rewrite your launcher to another language than to us e it.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Chris Morgan
Chris Morgan's picture
Last seen: 7 years 5 months ago
Joined: 2007-04-15 21:08

From the "Instructions" page of the NSIS User Manual:

4.9 Instructions
4.9.1 Basic Instructions
{...} ExecShell
Execute the specified program using ShellExecute. Note that action is usually
"open", "print", etc, but can be an empty string to use the default action.
Parameters and the show type are optional. $OUTDIR is used for the working
directory. The error flag is set if the process could not be launched.

ExecShell "open" ""
ExecShell "open" "$INSTDIR\readme.txt"
ExecShell "print" "$INSTDIR\readme.txt"

I hope that that's what you want.

Chris Morgan

"I would talk in iambic pentameter if it were easier."
— Howard Nemerov

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Last seen: 13 years 3 months ago
Joined: 2007-04-05 12:34

Actually, I found out about that yesterday, and it's just what I want, I just forgot to post about it. BTW, where is this 'NSIS User Manual'??

Log in or register to post comments