Archive: onVerifyInstDir and silent mode


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,


Use IfSilent in .onInit and verify it there (aswell).

-Stu


Tried it, but when you use /D= as a parameter, it also won't work.


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