mweintr
Posts: 10
Joined: Mon Sep 22, 2008 7:58 pm

Trouble editing PATH system variable

Tue Jun 23, 2009 11:46 pm

My installer project is at a stand-still. I need to append to the PATH system variable during my installation, and every method I've tried within Advanced Installer has failed on me.

[I did a search of the forum, first, but the terms "key path registry system" were excluded from my search, which made the search feature here all but useless. FYI.]

Originally, I tried doing it through the Environment project detail, but it seemed to choke on appending my path to the PATH variable. I think the problem had to do with existing PATH variables with a space in it (like "C:\Program Files\"), but testing hasn't borne that out.

Next, I tried editing the registry key HKLM\System\CurrentControlSet\Control\Session Manager\Environment\PATH, but the behavior has been sporadic. Mostly, the Installer has been replacing (not appending, or prepending -- as I tried once to do) the existing PATH with the path I'm trying to add to it. Or, it has been deleting it, entirely.

Also, in the Registry editor of AI, my new PATH variable's type is REG_SZ, but when I look in the Registry on the test system, it shows up as REG_MULTI_SZ. I don't know enough about the Windows registry to know if this is a problem or not.

This has become very frustrating, and I can't figure out what I'm doing wrong.

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: Trouble editing PATH system variable

Wed Jun 24, 2009 8:40 am

Hi,
[I did a search of the forum, first, but the terms "key path registry system" were excluded from my search, which made the search feature here all but useless. FYI.]
Unfortunately the forum search engine has some limitations. You can try using the search on our website. It returns results from both the User Guide and the forum.

The recommended way of setting environment variables is by using the Environment page. Can you please give me more details about the problems you encountered when using this approach?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

bcaldwell
Posts: 2
Joined: Wed Jun 24, 2009 5:57 pm

Re: Trouble editing PATH system variable

Wed Jun 24, 2009 6:15 pm

To clarify the previous post, we are having trouble setting the "system environment variable": PATH. We have attempted to set this variable normally in the environment variable section, as well as by editing the variable in the registry. We believe the trouble occurs when a computer already has a %Path% variable with a value that contains a space in the name (ex: /Program Files/). When this is the case, we cannot append to this value. When this is not the case, we are successful. Unfortunately, it is generally the case that we are unsuccessful. Have you encountered this bug? Is there a way around this? Thank you,

Blake
mweintr wrote:My installer project is at a stand-still. I need to append to the PATH system variable during my installation, and every method I've tried within Advanced Installer has failed on me.

Originally, I tried doing it through the Environment project detail, but it seemed to choke on appending my path to the PATH variable. I think the problem had to do with existing PATH variables with a space in it (like "C:\Program Files\"), but testing hasn't borne that out.

Next, I tried editing the registry key HKLM\System\CurrentControlSet\Control\Session Manager\Environment\PATH, but the behavior has been sporadic. Mostly, the Installer has been replacing (not appending, or prepending -- as I tried once to do) the existing PATH with the path I'm trying to add to it. Or, it has been deleting it, entirely.

Also, in the Registry editor of AI, my new PATH variable's type is REG_SZ, but when I look in the Registry on the test system, it shows up as REG_MULTI_SZ. I don't know enough about the Windows registry to know if this is a problem or not.

This has become very frustrating, and I can't figure out what I'm doing wrong.

bcaldwell
Posts: 2
Joined: Wed Jun 24, 2009 5:57 pm

Re: Trouble editing PATH system variable

Thu Jun 25, 2009 1:08 am

Figured it all out. Successfully overcame the space issue, then also discovered there was a '/' at the end of one of the environment variables (Java_Home) which is not handled well on all systems. Thanks for your time,

Blake
bcaldwell wrote:To clarify the previous post, we are having trouble setting the "system environment variable": PATH. We have attempted to set this variable normally in the environment variable section, as well as by editing the variable in the registry. We believe the trouble occurs when a computer already has a %Path% variable with a value that contains a space in the name (ex: /Program Files/). When this is the case, we cannot append to this value. When this is not the case, we are successful. Unfortunately, it is generally the case that we are unsuccessful. Have you encountered this bug? Is there a way around this? Thank you,

Blake
mweintr wrote:My installer project is at a stand-still. I need to append to the PATH system variable during my installation, and every method I've tried within Advanced Installer has failed on me.

Originally, I tried doing it through the Environment project detail, but it seemed to choke on appending my path to the PATH variable. I think the problem had to do with existing PATH variables with a space in it (like "C:\Program Files\"), but testing hasn't borne that out.

Next, I tried editing the registry key HKLM\System\CurrentControlSet\Control\Session Manager\Environment\PATH, but the behavior has been sporadic. Mostly, the Installer has been replacing (not appending, or prepending -- as I tried once to do) the existing PATH with the path I'm trying to add to it. Or, it has been deleting it, entirely.

Also, in the Registry editor of AI, my new PATH variable's type is REG_SZ, but when I look in the Registry on the test system, it shows up as REG_MULTI_SZ. I don't know enough about the Windows registry to know if this is a problem or not.

This has become very frustrating, and I can't figure out what I'm doing wrong.

Return to “Common Problems”