RSS Forums RSS

Install Directory of another program

Please support our C++ advertiser: Programming Forums
Thread Solved
Reply
Posts: 9
Reputation: maxicube is an unknown quantity at this point 
Solved Threads: 0
maxicube maxicube is offline Offline
Newbie Poster

Install Directory of another program

  #1  
Nov 21st, 2008
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"
Last edited by maxicube : Nov 21st, 2008 at 9:08 am.
AddThis Social Bookmark Button
Reply With Quote  
Posts: 2,353
Reputation: niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of niek_e has much to be proud of 
Solved Threads: 256
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Nearly a Posting Maven

Re: Install Directory of another program

  #2  
Nov 21st, 2008
Originally Posted by maxicube View Post
i fond the key which might be useful. (how would i open it?


How about using this incredible site ?
Last edited by niek_e : Nov 21st, 2008 at 9:53 am.
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
Reply With Quote  
Posts: 9
Reputation: maxicube is an unknown quantity at this point 
Solved Threads: 0
maxicube maxicube is offline Offline
Newbie Poster

Re: Install Directory of another program

  #3  
Nov 21st, 2008
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);
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the C++ Forum
Views: 368 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:43 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC