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: Updating PATH For Running Application
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
‎Nov 12, 2007
09:27 AM
Updating PATH For Running Application
Hi,
I have a requirement to "refresh" currently running applications with the updated PATH environment variable following a Simple MSI installation.
I'm using a C DLL for my custom actions and have tried Commit, Deferred and Immediate execution.
The application in question is IE7, and I've tried various Windows API methods such as:
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment")
and
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_NORMAL, 1000, 0)
but with no luck! I've even tried enumerating the top-level windows using:
EnumChildWindows(0, callbackFunction, 0)
Has anyone got this to successfully work? How? :confused:
Thanks for any help offered! 😄
I have a requirement to "refresh" currently running applications with the updated PATH environment variable following a Simple MSI installation.
I'm using a C DLL for my custom actions and have tried Commit, Deferred and Immediate execution.
The application in question is IE7, and I've tried various Windows API methods such as:
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment")
and
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_NORMAL, 1000, 0)
but with no luck! I've even tried enumerating the top-level windows using:
EnumChildWindows(0, callbackFunction, 0)
Has anyone got this to successfully work? How? :confused:
Thanks for any help offered! 😄
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
04:44 PM
I haven't tried it myself, but does the SetEnvironmentVariable API function work in this case? Please see [thread=146835]this long thread[/thread] for a discussion of the issues...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 13, 2007
02:21 AM
Hi Robert,
Not sure that this will do it, perhaps a bit more background info might be useful.
I did write a CA that successfully refreshed the PATH for IE some time ago, unfortunately (or is that stupidly 😮 ) I lost the code! :eek:
Not sure that this will do it, perhaps a bit more background info might be useful.
- I've got a web page that requires a series of ActiveX controls.
- When a user accesses the page for the 1st time the page automatically downloads a CAB file which contains a simple MSI installation.
- As part of the installation, the system PATH is updated however IE does not recognise this new PATH until I close down IE and restart it.
I did write a CA that successfully refreshed the PATH for IE some time ago, unfortunately (or is that stupidly 😮 ) I lost the code! :eek:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 13, 2007
08:27 AM
Would simply refreshing the webpage do the trick? Like replicating an F5 keypress?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 13, 2007
08:29 AM
Unfortunately not, the PATH is tied to the process not the page.