Skip to content
⌘ NSIS Forum Archive

Problem with ifFileExists

7 posts

mhollander#

Problem with ifFileExists

If I just check for C:\Program Files\Acme\Rockets\Super Booster then the installer will crash

If I check in stages then it will be OK E.G.

Check for C:\Program Files\Acme
Then for C:\Program Files\Acme\Rockets
Then for C:\Program Files\Acme\Rockets\Super Booster

The program will not crash

Is this by design or is it a problem 😕

Sample code to demonstrate:

Goto CheckSupport
CheckSupport:
ifFileExists "$EXEDIR\SUPPORT\*.*" CheckMMC Disable
CheckMMC:
ifFileExists "$EXEDIR\SUPPORT\MMC\*.*" CheckIMMCEXE Disable
CheckIMMCExe:
ifFileExists "$EXEDIR\SUPPORT\MMC\IMMC.exe" Enable Disable
Disable:
StrCpy $0 0
Goto CheckComplete
Enable:
StrCpy $0 1
Goto CheckComplete
CheckComplete:
mhollander#
I have noticed however that the AddSize Command does not work anymore
😉

My Mistake, Too many sections in my install and I got confused.

The AddSize is working perfectly

Sorry for the scare.