MasterViVi
29th August 2005 17:12 UTC
onVerifyInstDir and silent mode
I currently use .onVerifyInstDir to make sure it's the correct directory (it checks for winamp.exe). However, when I use Silent Mode, it doesn't use .onVerifyInstDir to verify. It just installs anywhere. How can I fix this?
Thanks in advance,
Afrow UK
30th August 2005 00:29 UTC
Use IfSilent in .onInit and verify it there (aswell).
-Stu
MasterViVi
30th August 2005 22:49 UTC
Tried it, but when you use /D= as a parameter, it also won't work.
deguix
30th August 2005 23:08 UTC
Full working example code is below. Command line to run the program:
Test.exe /S /D=C:\Program Files
The example:
OutFile Test.exe
Function .onInit
IfSilent 0 +3
MessageBox MB_OK "Silent. Install dir: $INSTDIR"
Goto +2
MessageBox MB_OK "Not silent."
FunctionEnd
Section
SectionEnd
MessageBox output:
Silent. Install dir: C:\Program Files