I have about 50 install scripts that I need to change the default install path in. Now all of them use a define in the nsisconf.nsh file to set the default root install path for all applications.
!Define DEFAULT_APP_PATH "C:\Program Files\Company\....."
The company was sold to a new parent company and now the default root isntall path would be.
!Define DEFAULT_APP_PATH "C:\Program Files\NewCompany\....."
The problem is that when new installs are ran they want the Old Default path used if the location had previous versions installed and the new path when the application was never installed. So what I am attempting to do is set a conditional check in the nsisconf.nsh file to check for the default root path. However, all my efforts have resulted in a compile error that the check is not valid outside of a section. How can I do something similar to the following within the nsisconf.nsh file
Any Ideas?
${DirState} "D:\Program Files\Company\....." $0
StrCmp $0 "-1" NoAppsInstalled 0
!define DEFAULT_APP_PATH "C:\Program Files\Company\....."
Goto DefaultPathSet
NoAppsInstalled:
!define DEFAULT_APP_PATH "C:\Program Files\NewCompany\....."
DefaultPathSet:
I have tried using functions and macros as well but still get the same error with a function the Call Function name generates the error.