Update Path??
-
- Posts: 3
- Joined: Wed Jun 01, 2011 6:13 pm
Update Path??
I'm trying to add an installation target directory to the system path - it seems like such a simple thing to do, but I can't make it work. The script line for setting the path looks like "Set Environment Variable %path% to $targetdir$" . What am I missing?
Re: Update Path??
Have you executed Apply Install after setting its value?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
-
- Posts: 3
- Joined: Wed Jun 01, 2011 6:13 pm
Re: Update Path??
Yes, there is an Apply Install immediately following the Set Environment Command. I've stepped through this with the debugger, and following the apply install the variable SUCCESS has the value COMPLETE, and TARGETDIR has the value C:\Program Files (x86)\\GEM, which looks correct except for the double backslash. However, I can't find where the path has been modified after the install has completed. The Set Environment dialog is configured to always set variable, Add value to beginning of variable, and the variable is set for All users.
Re: Update Path??
Hi,
It might take a reboot before that takes effect - please try that and let me know.
It might take a reboot before that takes effect - please try that and let me know.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 3
- Joined: Wed Jun 01, 2011 6:13 pm
Re: Update Path??
Rebooting or logging off/on seems to fix the problem, but sometimes it works without the reboot. I hate to complain, but I never had these kind of issues with Wise.
Re: Update Path??
Hi,
In my experience working with environment variables outside of InstallAware, a reboot is always recommended before the changes take effect.
This has to do with Windows and not with InstallAware..
In my experience working with environment variables outside of InstallAware, a reboot is always recommended before the changes take effect.
This has to do with Windows and not with InstallAware..
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 1
- Joined: Wed Aug 28, 2013 7:36 am
Solution - Re: Update Path??
I am currently evaluating InstallAware 17 and I'm disappointed in the above response.
This is indeed a bug in InstallAware. After updating the system or user PATH environment variables, the installer MUST broadcast a message to all top level windows to inform them that system settings have changed. Sample Win32 API function call:
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 5000, &dwReturnValue);
I would expect InstallAware to make this happen in an MSI automatically if any environment variables are changed. It doesn't.
QUICK WORKAROUND:
1. Install AutoHotKey (32-bit) - http://www.autohotkey.com/.
2. Make a file called EnvUpdate.ahk. Put one line of text in the file:
EnvUpdate
3. Save.
4. Right-click the file, and choose Compile Script.
5. Install the resulting EnvUpdate.exe in your $TARGETDIR_X86$ (pick it in Files and Settings on the Design tab).
6. On the Project tab, in Run Programs, set the installer to run $TARGETDIR_X86$\EnvUpdate.exe at the Finish dialog.
Note: All new processes launched by explorer.exe will get the new environment. Existing processes will get the new environment if they are programmed to handle WM_SETTINGCHANGE correctly. To see this effect, open a command prompt before you run your installer, run the installer, then open another command prompt. In each prompt, type SET [Enter]. The new environment variable values will be set in the command prompt you opened after the installer, but not before.
This is indeed a bug in InstallAware. After updating the system or user PATH environment variables, the installer MUST broadcast a message to all top level windows to inform them that system settings have changed. Sample Win32 API function call:
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 5000, &dwReturnValue);
I would expect InstallAware to make this happen in an MSI automatically if any environment variables are changed. It doesn't.
QUICK WORKAROUND:
1. Install AutoHotKey (32-bit) - http://www.autohotkey.com/.
2. Make a file called EnvUpdate.ahk. Put one line of text in the file:
EnvUpdate
3. Save.
4. Right-click the file, and choose Compile Script.
5. Install the resulting EnvUpdate.exe in your $TARGETDIR_X86$ (pick it in Files and Settings on the Design tab).
6. On the Project tab, in Run Programs, set the installer to run $TARGETDIR_X86$\EnvUpdate.exe at the Finish dialog.
Note: All new processes launched by explorer.exe will get the new environment. Existing processes will get the new environment if they are programmed to handle WM_SETTINGCHANGE correctly. To see this effect, open a command prompt before you run your installer, run the installer, then open another command prompt. In each prompt, type SET [Enter]. The new environment variable values will be set in the command prompt you opened after the installer, but not before.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Update Path??
Dear User,
this matter has been extensively discussed with the forum ... I may suggest you to have a look at the following topic;
http://www.installaware.com/forum/viewtopic.php?f=2&t=9515
Anyway, I don't agree with your reply as well.
Not all running processes, including OS processes, are able to handle the SendMessage notification and this is the reason why, the notification mesaage is not automatically issued. In addition, It depends on which Env variable you are updating and if the case, you could send the message notification.
Regards
this matter has been extensively discussed with the forum ... I may suggest you to have a look at the following topic;
http://www.installaware.com/forum/viewtopic.php?f=2&t=9515
Anyway, I don't agree with your reply as well.
Not all running processes, including OS processes, are able to handle the SendMessage notification and this is the reason why, the notification mesaage is not automatically issued. In addition, It depends on which Env variable you are updating and if the case, you could send the message notification.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 78 guests