View Single Post
Re: Steam directory registry key.
Old
  (#8)
Cpl. Shrike
ShrikeBot Coder/Moderator
 
Cpl. Shrike's Avatar
 
Status: Offline
Posts: 550
Join Date: Mar 2004
Location: The Netherlands
Default Re: Steam directory registry key. - 11-03-2004

Oh btw.

it also points to "dod"
because that's the zip root

\dod\dlls\bla bla
\dod\shrikebot\bla bla
etc etc

so i only needed \email\day of defeat\


--------------------

This is how i got your install path for dod steam (For the coders)
Code:
 if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Valve\\Steam"), 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
 {  // opening your reg key...
    dwLength = 256*sizeof(TCHAR);
    if ((rc=RegQueryValueEx(hRegKey, _T("ModInstallPath"), NULL, NULL, (BYTE*)keyValue, &dwLength))==ERROR_SUCCESS)
    szValue = keyValue;   //this is the install path
 
    ::RegCloseKey(hRegKey);
    if (ModId == MOD_TOD)
    m_strPath = szValue;   // this is used as install path for TOD
 
    else // make DOD path.
    {
 	  x = strlen(szValue) - 9;  // minus "half-life"
 	  strncpy(msg2, szValue, x);
 	  msg2[x]='\0';
 	  strcat(msg2, "day of defeat"); // add "day of defeat"
 	  m_strPath = msg2;  // this is used as install path for DOD
    }
 }

Last edited by Cpl. Shrike; 11-03-2004 at 23:56..
  
Reply With Quote