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: CommonAppDataFolder
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
Sep 26, 2012
08:58 AM
CommonAppDataFolder
We use InstallShield 2012 with the .ism install script. We install our product on XP, Windows 2000, Windows 7, Server 2003 and Server 2008R2.
How do I populate the value of the CommonAppDataFolder from the OS I'm installing on to be used inside the .ism script?
I see a function GetCommonAppDataFolder already exists but do not see any instructions on how to us it.
Searching the Help index doesn't provide any examples of how to get the CommonAppDataFolder value.
Thank you for any assistance.
SFC
How do I populate the value of the CommonAppDataFolder from the OS I'm installing on to be used inside the .ism script?
I see a function GetCommonAppDataFolder already exists but do not see any instructions on how to us it.
Searching the Help index doesn't provide any examples of how to get the CommonAppDataFolder value.
Thank you for any assistance.
SFC
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 27, 2012
12:34 AM
Have you tried using FOLDER_COMMON_APPDATA in InstallScript?
this should work in your case.
this should work in your case.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 27, 2012
06:08 PM
If you are simply trying to install certain files to a subdirectory under the CommonAppDataFolder then of course you could just put those files in a component whose Destination value is:
[CommonAppDataFolder]MyProduct\MyFiles
But if you want to define a string value that equates to the value of the CommonAppDataFolder, you could use SysInfo to just set that string yourself, based on what OS you're on. Use SYSINFO.nISOSL as described below (taken from online help). Based on the return value, just manually define the string to be the value you already know it would be on that OS. Not an elegant solution, but it would work.
Another way of using SysInfor to do this:
SYSINFO.nISOSL
Value indicates the operating system of the target machine. Possible values are the following:
•ISOSL_WIN95—Windows 95
•ISOSL_WIN98—Windows 98
•ISOSL_WINME—Windows Millennium Edition
•ISOSL_NT40—Windows NT 4.0
•ISOSL_WIN2000—Windows 2000
•ISOSL_WINXP—Windows XP Edition
•ISOSL_WINSERVER2003—Windows Server 2003
•ISOSL_WINVISTA—Note that Windows Vista and Windows Server “Longhorn” use the same major and minor version numbers. Therefore, if you want to use InstallScript to distinguish between Windows Server “Longhorn” and Windows Vista, check whether SYSINFO.nOSProductType = VER_NT_WORKSTATION; for Windows Vista, this is TRUE; for Windows Server “Longhorn,” it is FALSE.
[CommonAppDataFolder]MyProduct\MyFiles
But if you want to define a string value that equates to the value of the CommonAppDataFolder, you could use SysInfo to just set that string yourself, based on what OS you're on. Use SYSINFO.nISOSL as described below (taken from online help). Based on the return value, just manually define the string to be the value you already know it would be on that OS. Not an elegant solution, but it would work.
Another way of using SysInfor to do this:
if (SYSINFO.WINNT.bWinXP) then
MessageBox("Installing on Windows XP",INFORMATION);
// set string value, e.g., strCmnApDatFldr = "...FullyDefinedValue..."
endif;
SYSINFO.nISOSL
Value indicates the operating system of the target machine. Possible values are the following:
•ISOSL_WIN95—Windows 95
•ISOSL_WIN98—Windows 98
•ISOSL_WINME—Windows Millennium Edition
•ISOSL_NT40—Windows NT 4.0
•ISOSL_WIN2000—Windows 2000
•ISOSL_WINXP—Windows XP Edition
•ISOSL_WINSERVER2003—Windows Server 2003
•ISOSL_WINVISTA—Note that Windows Vista and Windows Server “Longhorn” use the same major and minor version numbers. Therefore, if you want to use InstallScript to distinguish between Windows Server “Longhorn” and Windows Vista, check whether SYSINFO.nOSProductType = VER_NT_WORKSTATION; for Windows Vista, this is TRUE; for Windows Server “Longhorn,” it is FALSE.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)