For example let the directory be C:\MyDlls.
The path should be update to %PATH%;C:\MyDlls. The next time if use any function such as UseDLL( ), the function should succeed without specifying the absolute path of the DLL.
Setting Updated Path
Posted 15 February 2002 - 08:07
Posted 15 February 2002 - 10:04
Note that changes in the environment only get passed to installshield if you are running it directly with setup.exe. If you're running your setup from the IDE, changes in environment don't get through to the setup.
Ide
Posted 15 February 2002 - 17:05
// FOR PATH SYSTEM VARIABLE, ADD REFERENCE TO THE INSTALL FOLDER
Disable(LOGGING);
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE);
szTNDKey = "\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
szTNDClass = "";
if ( RegDBKeyExist ( szTNDKey ) < 0 ) then
MessageBox(szMsg, SEVERE);
exit;
endif;
szTNDStrName = "Path";
RegDBGetKeyValueEx ( szTNDKey, szTNDStrName, nvType, szTNDStrValue, nvSize);
if (!( szTNDStrValue % TARGETDIR )) then
szTNDStrValue = szTNDStrValue ^ ";";
szTNDStrValue = szTNDStrValue + TARGETDIR ^ "\\BIN";
RegDBSetKeyValueEx ( szTNDKey, szTNDStrName, REGDB_STRING_EXPAND, szTNDStrValue, -1 );
endif;
Enable(LOGGING);
Posted 15 February 2002 - 17:24
#define WM_WININICHANGE 0x001A
#define HWND_BROADCAST 0xffff
function VOID BroadcastEnvironment()
STRING svEnv;
POINTER pEnv;
begin
// All expanded Strings are now written to the registry. Broadcast.
svEnv = "Environment";
pEnv = &svEnv;
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
end;
Posted 15 February 2002 - 19:40
--
Okay, that would certainly force it., but if you're install already requires a reboot then that would also take care of updating it.
Good to know though Ide, thanks.