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: Appending to the System Path
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 27, 2011
02:52 PM
Appending to the System Path
I'm building a system utility. I will be installing it in program files.
Before the install completes, I want to add a path of the install folder to the system path. I see how to add to the system path, but how do I know which path to add? How do I automate the correct one?
On some machines, the path I need to append will be:
[~];C:\Program Files\MyStuff
and on other machines
[~];C:\Program Files (x86)\MyStuff
How do I get past this dilemma?
Before the install completes, I want to add a path of the install folder to the system path. I see how to add to the system path, but how do I know which path to add? How do I automate the correct one?
On some machines, the path I need to append will be:
[~];C:\Program Files\MyStuff
and on other machines
[~];C:\Program Files (x86)\MyStuff
How do I get past this dilemma?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2011
10:37 AM
Use a reference to a directory property instead of a hardcoded string. This will offer further benefit if the user overrides the installation location. Assuming this is your main installation directory, chances are you should use:
[~];[INSTALLDIR]
[~];[INSTALLDIR]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2011
10:54 AM
Ok, thanks. I'm on the first day of my trial so I didn't know about predefined variables. Is there a list somewhere?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2011
10:59 AM
That's a deeper and more complicated question than it sounds like. The items you're asking about are called Properties. There are lots of predefined ones from the system, and then there are a handful we add to projects by default for the base features we provide. Then more can show up for directories or text boxes or many other things you add to your project.
For the example of INSTALLDIR, you can see this in the Files and Folders view. It's listed in the tree, or you can right click the My Product Name [INSTALLDIR] node, and see that it's using Directory Identifier INSTALLDIR, and that's the name you would want to reference as a property. (Note that they are case sensitive.)
For the example of INSTALLDIR, you can see this in the Files and Folders view. It's listed in the tree, or you can right click the My Product Name [INSTALLDIR] node, and see that it's using Directory Identifier INSTALLDIR, and that's the name you would want to reference as a property. (Note that they are case sensitive.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2011
12:21 PM
Thank you. I'm sure I'll correllate more of this as I go along.