Old 1st October 2008, 21:09   #1
patelb
Junior Member
 
Join Date: Jul 2008
Posts: 26
ExecWait with parameters?

My program requires .Net framework so I do a check for it and if its not installed, I install it like so:

File /oname=$PLUGINSDIR\dotnetfx3.exe "..\..\Support\dotnetfx3.exe"

ExecWait '$PLUGINSDIR\dotnetfx3.exe /q /norestart' $R0

Doing it this way requires packing the .net installer into my installer which makes the size of my installer pretty big. What I want to be able to do is just call the .net installer directly from the "..\..\Support\dotnetfx.exe" directory. So I tried doing this:

ExecWait '$PLUGINSDIR\dotnetfx3.exe /q /norestart' $R0

The reason the directory structure is different for this call is because the NSIS Script and the Executable it produces are in two different directories. When I call the .net installer this way it wont recognize the parameters and it just launches the regular installer. But I need the .net installer to run in silent mode. What am I doing wrong?

Note: Eventually I want to be able to pack all this onto a CD, if that changes anything
patelb is offline   Reply With Quote
Old 1st October 2008, 22:34   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
you forgot to RTFM
code:

ExecWait '"path\app.exe" /param1 /param2="foo bar"' $0


IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 1st October 2008, 22:39   #3
patelb
Junior Member
 
Join Date: Jul 2008
Posts: 26
Sorry there was a mistake in my first post. The second ExecWait call should have been:

ExecWait 'Support\dotnetfx3.exe /q /norestart' $R0.

Also ive already tried this:
ExecWait '"Support\dotnetfx3.exe" /a /norestart' $0

That didnt work either.
patelb is offline   Reply With Quote
Old 1st October 2008, 23:15   #4
patelb
Junior Member
 
Join Date: Jul 2008
Posts: 26
Okay a new discovery

If I specify the full path like this:

ExecWait '"C:\Somefolder\Anotherfolder\Support\dotnetfx3.exe" /a /norestart' $0

Everything works fine, the parameters are recognized and the silent installer is deployed.

If I do it using relative path as I was trying to do:

ExecWait '"Support\dotnetfx3.exe" /a /norestart' $0

The paramaters are not recognized and the regular installer is deployed. I want to do it using a relative path because eventually I will have the installer on a CD and will not know what drive letter the CD drive is. What am I doing wrong?
patelb is offline   Reply With Quote
Old 2nd October 2008, 03:24   #5
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
did you try ".\Support\dotnetfx3.exe . . ."?

when in doubt, add ".\" (this is shorthand for current working directory in the same way that ..\ is up one level from the current directory)

also, make sure the current directory is the right one. use the SetOutPath to set your current directory.
qwertymodo is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump