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"

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

How about using this incredible site ? :)

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);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.