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,
onVerifyInstDir and silent mode
4 posts
Use IfSilent in .onInit and verify it there (aswell).
-Stu
-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:
The example:Test.exe /S /D=C:\Program Files
MessageBox output: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
Silent. Install dir: C:\Program Files