Install Directory of another program

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Nov 2008
Posts: 18
Reputation: maxicube is an unknown quantity at this point 
Solved Threads: 0
maxicube maxicube is offline Offline
Newbie Poster

Install Directory of another program

 
0
  #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?
  1. [HKEY_CURRENT_USER\Software\Valve\HLServer]
  2. "InstallPath"="C:\\hlds"
  3. "Full Name"="Half-Life Dedicated Server"
  4. "Region"="5"
Last edited by maxicube; Nov 21st, 2008 at 10:08 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,841
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 298
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Roasting Maven

Re: Install Directory of another program

 
0
  #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 10:53 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 18
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

 
0
  #3
Nov 21st, 2008
heh. didnt help me that much :/ but dad had some code for me

  1. HKEY hKey;
  2. DWORD buffersize = 1024;
  3. char* hldsloc = new char[buffersize];
  4. RegOpenKeyEx (HKEY_CURRENT_USER,
  5. "Software\\Valve\\HLServer",NULL,KEY_READ,&hKey);
  6. RegQueryValueEx(hKey,"InstallPath",NULL,NULL,(LPBYTE) hldsloc,&buffersize);
  7. RegCloseKey (hKey);
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC