Skip to content
⌘ NSIS Forum Archive

onVerifyInstDir and silent mode

4 posts

MasterViVi#

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,
deguix#
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