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
- :
- Convert Environment Variable to Short Name
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2010
10:01 AM
Convert Environment Variable to Short Name
I am setting an Environment variable to [INSTALLDIR]. But if INSTALLDIR contains "Program Files", I need it to be "Progra~1".
Since the user gets to change INSTALLDIR, I need some type of way to convert it to a short name.
This is for a 64bit Basic MSI so I am not using scripts. Any ideas?
Thanks
Since the user gets to change INSTALLDIR, I need some type of way to convert it to a short name.
This is for a 64bit Basic MSI so I am not using scripts. Any ideas?
Thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2010
11:17 AM
On Formatted, it describes the notations [!filekey] and [$componentkey]; the former is a short path for the registry or ini file changes, but includes a file; the latter is the folder but doesn't say anything about being a short path. You may have to write a custom action in the language of your choice to handle this.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 16, 2010
01:43 PM
I don't understand how I can use that to set Environment variables in InstallShield.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)