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: InstallScript Set ENV
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
‎Dec 03, 2008
05:54 PM
InstallScript Set ENV
I need to set an environment var for a db home.. what is the easiest way to do this? I've tried a couple things and they aren't working..
Thanks
Thanks
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2008
06:20 PM
If you're asking about an InstallScript project, please see InstallShield KB articles Q107382 and Q100090; I believe InstallSite has an InstallScript sample, too. For MSI, there's an Environment Variables view you can use.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 04, 2008
12:06 PM
I found the script example but HWND_BROADCAST does not work with Windows XP...
function Exc_RefreshEnvironment()
HWND hWnd;
LONG lParam;
LONG wParam;
SHORT shMsg;
STRING szParam;
begin
hWnd = HWND_BROADCAST;
shMsg = WM_SETTINGCHANGE;
wParam = 0;
szParam = "Environment";
lParam = &szParam;
SendMessage(hWnd, shMsg, wParam, lParam);
end;
Any idea what else i could use?
function Exc_RefreshEnvironment()
HWND hWnd;
LONG lParam;
LONG wParam;
SHORT shMsg;
STRING szParam;
begin
hWnd = HWND_BROADCAST;
shMsg = WM_SETTINGCHANGE;
wParam = 0;
szParam = "Environment";
lParam = &szParam;
SendMessage(hWnd, shMsg, wParam, lParam);
end;
Any idea what else i could use?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 04, 2008
02:26 PM
OK - my software engineer tells me what I need to create is the following..
SEQUIOA_HOME C:\Program\DB\Sequoia
So, I know I need to create a value w/value data under
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment.
I'm setting the following
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
I';m just not sure which REGDB function is the best to create the value, since I'm not creating a true KEY...
Would I want to use
RegDBSetKeyValueEx(szPath,szKey,REGDB_STRING_EXPAND,szValue,-1);
??
Thanks
SEQUIOA_HOME C:\Program\DB\Sequoia
So, I know I need to create a value w/value data under
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment.
I'm setting the following
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
I';m just not sure which REGDB function is the best to create the value, since I'm not creating a true KEY...
Would I want to use
RegDBSetKeyValueEx(szPath,szKey,REGDB_STRING_EXPAND,szValue,-1);
??
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 08, 2008
02:27 PM
You have the correct formula