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
- :
- Drive portion of [INSTALLDIR]
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 17, 2008
12:08 PM
Drive portion of [INSTALLDIR]
I am writing a Basic MSI project and I want to be able to get just the drive letter and colon designation of the directory path selected in the Destination Directory dialog box. I know that this value is stored in the [INSTALLDIR] system variable, but could someone help me out with how I can parse out the selected drive letter from this variable?
Thanks.
Tim
Thanks.
Tim
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2008
12:14 PM
A custom action would be needed to parse the INSTALLDIR path. If an InstallScript custom action is used, the GetDisk function will return the drive from a path provided to it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2008
12:19 PM
Thanks Josh. One question though, how do I reference the system variable INSTALLDIR using this function? Can I simply use INSTALLDIR or do I need to enclose it in quotes, or in brackets, etc.?
Thanks!
Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 20, 2008
12:56 PM
For any immediate scheduled InstallScript custom actions, you can use the INSTALLDIR script variable to obtain the INSTALLDIR path. This can be passed as is to GetDisk (no quotes or brackets since it is a variable).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 20, 2008
01:11 PM
Thanks Josh, that did the trick!
Tim
Tim