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
- :
- How to get 'ProgramData' folder in a pure InstallScript project?
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
‎Feb 03, 2009
02:00 PM
How to get 'ProgramData' folder in a pure InstallScript project?
Hi,
I want to get 'ProgramData' folder in a pure InstallScript project (no MSI), and use it as the database file destination for Vista and later platforms. What is the reliable and simple way to do it in InstallScript code?
Thanks,
Peter
I want to get 'ProgramData' folder in a pure InstallScript project (no MSI), and use it as the database file destination for Vista and later platforms. What is the reliable and simple way to do it in InstallScript code?
Thanks,
Peter
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 03, 2009
05:19 PM
Ok, I made it by calling SHFolder.SHGetFolderPathA() in IS script.
The next problem for me is how to set the retuned path value to be the destination of some components, those components are marked to be installed only on Vista and Win Server 2008.
Again, since the install type is pure InstallScript (no MSI), all the methods (Property, CA, and so on) I am familia with for MSI are not available now. I know there is a way in pure script to call FeatureSetTarget(), but I would prefer (and am used) to make it available in the 'Setup Design' phase, making it (which can be set by script code at the early stage of installation) as a property/folder_name/etc.
Any suggestions?
Thanks,
Peter
The next problem for me is how to set the retuned path value to be the destination of some components, those components are marked to be installed only on Vista and Win Server 2008.
Again, since the install type is pure InstallScript (no MSI), all the methods (Property, CA, and so on) I am familia with for MSI are not available now. I know there is a way in pure script to call FeatureSetTarget(), but I would prefer (and am used) to make it available in the 'Setup Design' phase, making it (which can be set by script code at the early stage of installation) as a property/folder_name/etc.
Any suggestions?
Thanks,
Peter
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 04, 2009
02:09 AM
It´s simple.
Just create a 'Script-defined Folder' and use it as (part of) the destination for those components. Assign the real folder using FeatureSetTarget to the script defined folder.
Example:
Script-defined Folder is CommonAppData.
Assign Folder to CommonAppData:
FeatureSetTarget( MEDIA, "", szCommonAppDataFolder);
Just create a 'Script-defined Folder' and use it as (part of) the destination for those components. Assign the real folder using FeatureSetTarget to the script defined folder.
Example:
Script-defined Folder is CommonAppData.
Assign Folder to CommonAppData:
FeatureSetTarget( MEDIA, "
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 04, 2009
11:46 AM
That seems to be what I have to do - I originally wanted to avoid FeatureSetTarget() call and hoped to have other ways that works with just IDE (configurations/set property/etc.).
Thanks for your reply.
Thanks for your reply.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2009
03:24 AM
hi,
why you don´t use "commonappdata" (IS)variable?
greetings michael
why you don´t use "commonappdata" (IS)variable?
greetings michael