PDA

View Full Version : environmet variables



Holy Ghost
10-29-2003, 01:34 AM
How to create environment variables for Windows98/Me?...

MarcoHeineck
10-30-2003, 07:44 AM
Hi there,

9X systems store environment variables in file Autoexec.bat

Marco

Holy Ghost
11-03-2003, 12:27 AM
Originally posted by MarcoHeineck
Hi there,

9X systems store environment variables in file Autoexec.bat

Marco

I know... but it need a string in "" and delete this string(path).

kk sonu
11-04-2003, 04:02 AM
hi
try this!!! hope it will wrk
this is for tomcat

// set variable ALC_TOMCAT_INSTDIR
szKey = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);

nResult = RegDBSetKeyValueEx(szKey, "ALC_TOMCAT_INSTDIR", REGDB_STRING, szTomcatHome, nvSize);
if (nResult < 0) then
MessageBox("Failed to Set Environment Variable", WARNING);
else
// Flush the NT registry to all applications.
szEnv = "Environment";
pEnv = &szEnv;
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
endif;



all the best
kk

Holy Ghost
11-04-2003, 10:03 PM
it was for windows NT... i need for 9x