cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Program files x64 folder path in Suite Installer - Install script?

Hi friends,

In my suite installer , i have to set the program files folder path based on x64 and x86.
To my surprise, even if you do

SuiteGetProperty("ProgramFiles64Folder", szProgDir);

Suite Installer, sets it to Program files (x86) folder on a 64 bit machine. Why is it so?

Currently i did a work-around to fetch the details using Environment variable, but i want to know the reason behind this issue - Why ProgramFiles64Folder doesnt return the correct value?

Any thoughts guys?

Thanks
Labels (1)
0 Kudos
3 Replies
chad_petersen
Flexera beginner

Re: How to get Program files x64 folder path in Suite Installer - Install script?

This information makes me think that InstallScript is 32-bit only.

http://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/IHelp64BitSupport.htm#introduc...

Chad
0 Kudos
Not applicable

Re: How to get Program files x64 folder path in Suite Installer - Install script?

I'm pretty sure the suite installer invokes a 64-bit process called "Setup64" to handle 64-bit installs. Can't say I've ever had an issue with ProgramFiles64Folder - it always seems to be set correctly in my suite installers on a 64-bit OS.

I use it to construct INSTALLDIR for the package installers. At what point in the install process are you displaying its contents?
0 Kudos
Highlighted
chad_petersen
Flexera beginner

Re: How to get Program files x64 folder path in Suite Installer - Install script?

I agree with what you are seeing. I did this

SuiteGetProperty("ProgramFiles64Folder", szProgDir);
SuiteLogInfo("The folder is " + szProgDir);

scheduled it during OnBegin

Then ran

setup.exe /debuglog"C:\log.txt"

In the log file I see these entries. you can see the 4th line logs the result of the variable being set. Same result as you describe.

8-8-2017[02:17:29 PM]: Running event 'NewAction'
8-8-2017[02:17:29 PM]: Launching InstallScript action in function 'MyFunction'
8-8-2017[02:17:29 PM]: Engine: request for proxy handler, 0, 0
8-8-2017[02:17:31 PM]: (ISP Action): The folder is C:\Program Files (x86)\
8-8-2017[02:17:31 PM]: Action returned value 0x00000000
8-8-2017[02:17:31 PM]: Action 'NewAction' returned status 0x00000000

I did notice when running the Suite installer that the Setup.exe it launches appears in Task Manager as Setup.exe *32 indicating it is a 32-bit process.

Chad
0 Kudos