943,520 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 723
  • C++ RSS
Nov 21st, 2008
0

Install Directory of another program

Expand Post »
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?
C++ Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
maxicube is offline Offline
32 posts
since Nov 2008
Nov 21st, 2008
0

Re: Install Directory of another program

Click to Expand / Collapse  Quote originally posted by maxicube ...
i fond the key which might be useful. (how would i open it?
How about using this incredible site ?
Last edited by Nick Evan; Nov 21st, 2008 at 10:53 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Nov 21st, 2008
0

Re: Install Directory of another program

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

C++ Syntax (Toggle Plain Text)
  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);
Reputation Points: 10
Solved Threads: 0
Light Poster
maxicube is offline Offline
32 posts
since Nov 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help... Link list problem
Next Thread in C++ Forum Timeline: Convert Binary to Decimal and from Decimal to Binary





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC