0

how would I get the install directory of another program, the registry perhaps? (using HLDS as my directory to be found) (GET HLDS HERE!)

i fond the key which might be useful. (how would i open it?

[HKEY_CURRENT_USER\Software\Valve\HLServer]
"InstallPath"="C:\\hlds"
"Full Name"="Half-Life Dedicated Server"
"Region"="5"
2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by maxicube
0

heh. didnt help me that much :/ but dad had some code for me

HKEY hKey;
	DWORD buffersize = 1024;
	char* hldsloc = new char[buffersize];
	RegOpenKeyEx (HKEY_CURRENT_USER,
	"Software\\Valve\\HLServer",NULL,KEY_READ,&hKey);
	RegQueryValueEx(hKey,"InstallPath",NULL,NULL,(LPBYTE) hldsloc,&buffersize);
	RegCloseKey (hKey);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.