This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: INSTALLDIR is not C:\Program Files (x86) if user Select C:\Program Files for 32-bit
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2014
01:23 PM
INSTALLDIR is not C:\Program Files (x86) if user Select C:\Program Files for 32-bit
Our setup program lets users specify the folder to install the program. If they choose C:\program files on a 64-bit system, our INSTALLDIR value is set to that. However, the files get installed in the C:\Program Files (x86) folder. We need the INSTALLDIR variable (or some other variable) to reflect the actual folder name where the file is installed since we need to update registries, shortcuts, etc. to reflect this.
How do we get the actual folder name when InstallShielld makes that change behind the scenes? Thanks.
How do we get the actual folder name when InstallShielld makes that change behind the scenes? Thanks.
(21) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2014
01:48 PM
All x32 programs go into c:\program files (x86).
Don't think you want to mix x32 in the x64 directory.
Don't think you want to mix x32 in the x64 directory.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2014
01:55 PM
I agree. But in this case, I'm not specifying the folder name. The user is, and they've specified the wrong folder. InstallShield installs it in the proper folder (x86) which is great, but it doesn't update the INSTALLDIR value which is what the user specified. I need to know what folder the files are being installed in this situation. Is this kept in another variable? Any suggestions?
TurboFisch wrote:
All x32 programs go into c:\program files (x86).
Don't think you want to mix x32 in the x64 directory.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
09:10 AM
Files which are copied by 32-Bit setup go always into c:\program files (x86)
It is so.
It is so.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
09:37 AM
Thank you for your response. I agree and understand the X86 folder. I don't have a problem with it being automatically installed in a different folder from what the user selects.
My question is: How do I get the folder name of where it's actually installed? The name differs in different languages and the INSTALLDIR variable doesn't not contain the correct value.
My question is: How do I get the folder name of where it's actually installed? The name differs in different languages and the INSTALLDIR variable doesn't not contain the correct value.
Roman1 wrote:
Files which are copied by 32-Bit setup go always into c:\program files (x86)
It is so.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
12:54 PM
What project type is it Installscript, Basic MSI or InstallScript MSI ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
12:58 PM
Installscript
MarkusLatz wrote:
What project type is it Installscript, Basic MSI or InstallScript MSI ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
01:01 PM
Try to take a look at the user's guide and search for Disable(WOW64FSREDIRECTION). May be this solves your problem.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2014
01:19 PM
No, I don't want to disable it. I want the program to go to the right place. And it can be installed anywhere. We let the user choose. However, when they choose C:\Program Files, which is what INSTALLDIR is set to, InstallShield puts it in the x86 folder but doesn't update the INSTALLDIR value. I just need to know where it's actually installed.
MarkusLatz wrote:
Try to take a look at the user's guide and search for Disable(WOW64FSREDIRECTION). May be this solves your problem.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2014
12:56 AM
That's actually not true. That's only in English. There are equivalent names in other languages of Windows. What I need is the actual folder name where the files are installed. Any chance of getting that no matter what folder the user selects?
Roman1 wrote:
Files which are copied by 32-Bit setup go always into c:\program files (x86)
It is so.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2014
10:25 AM
Correct me if I am wrong, but isn't it the Operating system that is substituting the correct path for a 32bit install if the user changes to Program Files. Therefore if the property is reporting C:\Program Files\, I would just use that value because the operating system knows what to do.
I realize that you are using an InstallScript based installation, but in my MSI log files, I see references to where the operating system changes the bit for Program Files.
I realize that you are using an InstallScript based installation, but in my MSI log files, I see references to where the operating system changes the bit for Program Files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2014
01:51 PM
That may be fine, but I still need that value to put in the registry, create shortcuts and other things that require knowing where the files actually are. Just using the INSTALLDIR value fails. I'm open to suggestions. There's no need to know WHY I need. I just do.
DLee65 wrote:
Correct me if I am wrong, but isn't it the Operating system that is substituting the correct path for a 32bit install if the user changes to Program Files. Therefore if the property is reporting C:\Program Files\, I would just use that value because the operating system knows what to do.
I realize that you are using an InstallScript based installation, but in my MSI log files, I see references to where the operating system changes the bit for Program Files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2014
08:50 AM
If your installer is 32-bit, the package gets installed in programfiles(x86).
If you want to install it in programfiles, rebuild your installation kit as 64-bit installer.
If you want to install it in programfiles, rebuild your installation kit as 64-bit installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2014
09:30 AM
I think your missing the point of my thread. InstallShield or Windows is automatically installing it in the x86 folder, which is fine by me. What I need is the name of the folder. I'm using INSTALLDIR which is set to Program Files, but the actual folder name includes the x86. We allow people to specify any folder they want and set that value in the registry, create shortcuts, etc. Without the correct folder name, we have problems. Any suggestions welcome.
jagadish0911 wrote:
If your installer is 32-bit, the package gets installed in programfiles(x86).
If you want to install it in programfiles, rebuild your installation kit as 64-bit installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
01:15 AM
Just set INSTALLDIR in "General Information" to [ProgramFilesFolder]myOffice\
and bevore Installation ends put INSTALLDIR to registry.
and bevore Installation ends put INSTALLDIR to registry.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
04:44 AM
I can appreciate your situation. The situation is complicated by the fact that you are dealing with multiple languages and C:\Program Files may be C:\Programme Files\ or some other version.
How about if you put a check in to prevent a user from specifying the wrong folder.
If OS is x64 and user specifies any path in C:\Program Files\ then issue a message stating the problem to the end user and specify how to correct it.
You should be able to specify the path C:\Program Files programmatically so that you do not have to worry about the spelling of the path. You may need to use the bit that tells the script to use the 64bit path instead of transforming it to the 32bit path.
The installer by default should never specify this path, why a user would want to install there is beyond me, but if this is a problem with those who use the application then just prevent the problem in the first place.
How about if you put a check in to prevent a user from specifying the wrong folder.
If OS is x64 and user specifies any path in C:\Program Files\
You should be able to specify the path C:\Program Files programmatically so that you do not have to worry about the spelling of the path. You may need to use the bit that tells the script to use the 64bit path instead of transforming it to the 32bit path.
The installer by default should never specify this path, why a user would want to install there is beyond me, but if this is a problem with those who use the application then just prevent the problem in the first place.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
06:25 AM
I think you're missing the problem.
We give the user the ability to specify any folder they want to install the program. We default to the PROGRAM FILES folder. Using the standard dialog, the value the user selects gets assigned to INSTALLDIR.
Unfortunately, that variable doesn't hold the actual folder name in this situation, so when it gets put in the registry, the value is not the actual folder name. All I'm trying to do is to get the actual folder name. I don't want to prevent the user from specifying the folder. If they choose a folder that's not the PROGRAM FILES folder, this isn't a problem.
We give the user the ability to specify any folder they want to install the program. We default to the PROGRAM FILES folder. Using the standard dialog, the value the user selects gets assigned to INSTALLDIR.
Unfortunately, that variable doesn't hold the actual folder name in this situation, so when it gets put in the registry, the value is not the actual folder name. All I'm trying to do is to get the actual folder name. I don't want to prevent the user from specifying the folder. If they choose a folder that's not the PROGRAM FILES folder, this isn't a problem.
Roman1 wrote:
Just set INSTALLDIR in "General Information" to [ProgramFilesFolder]myOffice\
and before Installation ends put INSTALLDIR to registry.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
06:28 AM
Rather than do all this, is there an alternative to the INSTALLDIR variable that holds the correct value? Somewhere within IS, it knows the correct location that's different from what it has assigned to INSTALLDIR.
It doesn't seem to make sense to bother the user with a prompt since they haven't done anything wrong. The installer does the appropriate thing and installs it properly. All I need is a reliable way to know where.
It doesn't seem to make sense to bother the user with a prompt since they haven't done anything wrong. The installer does the appropriate thing and installs it properly. All I need is a reliable way to know where.
DLee65 wrote:
I can appreciate your situation. The situation is complicated by the fact that you are dealing with multiple languages and C:\Program Files may be C:\Programme Files\ or some other version.
How about if you put a check in to prevent a user from specifying the wrong folder.
If OS is x64 and user specifies any path in C:\Program Files\then issue a message stating the problem to the end user and specify how to correct it.
You should be able to specify the path C:\Program Files programmatically so that you do not have to worry about the spelling of the path. You may need to use the bit that tells the script to use the 64bit path instead of transforming it to the 32bit path.
The installer by default should never specify this path, why a user would want to install there is beyond me, but if this is a problem with those who use the application then just prevent the problem in the first place.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
07:14 AM
Normally, INSTALLDIR has always the path, which does user pick.
Just for fun, put on the last dialog ReadyToInstall a text field with Text "[INSTALLDIR]".
You will see what is the actual installation target.
Is your project msi? Are you using ISScript custom actions?
Just for fun, put on the last dialog ReadyToInstall a text field with Text "[INSTALLDIR]".
You will see what is the actual installation target.
Is your project msi? Are you using ISScript custom actions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
07:20 AM
Using ISScript custom actions. INSTALLDIR shows the Program Files folder, but the actual folder includes the x86. That's the inconsistency I'm trying to address.
Roman1 wrote:
Normally, INSTALLDIR has always the path, which does user pick.
Just for fun, put on the last dialog ReadyToInstall a text field with Text "[INSTALLDIR]".
You will see what is the actual installation target.
Is your project msi? Are you using ISScript custom actions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2014
07:29 AM
Please try to get INSTALLDIR using:
nValueBuf = 256;
MsiGetProperty(hMSI, "INSTALLDIR" , szInstalldir, nValueBuf);
Be careful, is the CA deferred, you have to get INSTALLDIR using
MsiGetProperty(hMSI,"CustomActionData",szInstalldir,nValueBuf);
Of course, CustomActionData must be set.
http://forum.installsite.net/index.php?showtopic=20780
nValueBuf = 256;
MsiGetProperty(hMSI, "INSTALLDIR" , szInstalldir, nValueBuf);
Be careful, is the CA deferred, you have to get INSTALLDIR using
MsiGetProperty(hMSI,"CustomActionData",szInstalldir,nValueBuf);
Of course, CustomActionData must be set.
http://forum.installsite.net/index.php?showtopic=20780
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)