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: Empty folder based on environment variable
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
Oct 20, 2011
07:25 AM
Empty folder based on environment variable
In the dialogs of our installer, a user can enter environment variables for destination folders (e.g. c:\temp\%username%\). When going through the installation this works fine for components that actually install files into the destination folders.
However, for empty folders we use the CreateFolder table in the Direct Editor. The variables that reference the destination folders in the CreateFolder table do not expand the environment variables. So if a user entered c:\temp\%username%\ during the setup, a folder with this exact name is created (including the "%"-signs)
Is there any way to expand environment variables for folders in the CreateFolder table?
However, for empty folders we use the CreateFolder table in the Direct Editor. The variables that reference the destination folders in the CreateFolder table do not expand the environment variables. So if a user entered c:\temp\%username%\ during the setup, a folder with this exact name is created (including the "%"-signs)
Is there any way to expand environment variables for folders in the CreateFolder table?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 20, 2011
02:56 PM
I think the CreateFolder table is likely to be "Formatted". If it is, you can use the expansions from this article including [%EnvVarName]. That said, the username is also available in a property [USERNAME]