patelb
1st October 2008 22:09 UTC
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
Anders
1st October 2008 23:34 UTC
you forgot to RTFM ;)
ExecWait '"path\app.exe" /param1 /param2="foo bar"' $0
patelb
1st October 2008 23:39 UTC
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
2nd October 2008 00:15 UTC
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?
qwertymodo
2nd October 2008 04:24 UTC
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.