.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Steam directory registry key.
Old
  (#1)
Drek
Member
 
Status: Offline
Posts: 64
Join Date: Feb 2004
Default Steam directory registry key. - 11-03-2004

This isn't really a bot coding question, but I didn't know where to ask this question, so I asked it here...

I'm putting together installers for the custom maps that I use on my servers, and I want to have it point by default to the correct directory. I found the registry key for third party mods (Steam\SteamApps\email\half-life) but I can't seem to find any key for the official mods. How do I set up the ClickTeam installer to install into the official mod directories (DOD etc.)?

Thanks in advance...
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#2)
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

HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath

HKEY_CURRENT_USER\\Software\\Valve\\DOD\\InstallPa th

HKEY_CURRENT_USER\\Software\\Valve\\Half-Life\\InstallPath

HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ModInst allPath


That's all the reg keys i know of for HL

Last edited by Cpl. Shrike; 11-03-2004 at 21:08..
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#3)
Drek
Member
 
Status: Offline
Posts: 64
Join Date: Feb 2004
Default Re: Steam directory registry key. - 11-03-2004

hmmm, actually, that is the one key I already knew about. How do I set up the installer to install to the correct directory then? I know you know how because your installer automagically points to the correct directory.

Last edited by Drek; 11-03-2004 at 21:12..
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#4)
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

Um i install to directories readed from the registery keys mentioned above.


I fact i don't know what's in the following keys
HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath
HKEY_CURRENT_USER\\Software\\Valve\\DOD\\InstallPa th

what i do is ::
I let my program look for those keys then read the contents from it and use that content as installation path.

For example:
HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath
This key is the official counter strike retail reg key. (won that is)

I don't know what's in it simply because i don't have counter strike retail.
So i let the installer program read your reg key. then i use that reg key content as intall path.

My installer ins't from clickteam or any but i coded it from a zip archive source code.

--------
edit.
or am i not getting your question ??

Last edited by Cpl. Shrike; 11-03-2004 at 22:08..
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#5)
Drek
Member
 
Status: Offline
Posts: 64
Join Date: Feb 2004
Default Re: Steam directory registry key. - 11-03-2004

hmmm, this is what is confusing me. Your installer automatically points to the correct directory on my computer, namely

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

However the registery key

HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ModInst allPath

points to

D:\Games\Steam\SteamApps\myemailaddress\half-life

on my computer.

There are no registry keys that I can find that point to

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

but that is what you are pointing to.

The other keys are WON keys and don't apply to the installers I am making for my clan because we play on Steam now.

How do you get the installer to point to

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

?

I know it can be done with the ClickTeam installer because I have seen it done. I even know I saw an explanation somewhere, but I can't remember where... Day of Defeat forums? I'd search there but the search function doesn't work for me right now...
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#6)
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

Ahhh yes

The installer grabs your reg key
D:\Games\Steam\SteamApps\myemailaddress\half-life

Since you clicked the dod button.
The installer strips the "half-life" and adds "day of defeat"
But i don't know the full path.

that's the only combination in which i edit the install paths.
All other combo's are just copy pasted from your registery

----------
edit

That's hard to do with clickteam installer.

I coded it in.

Last edited by Cpl. Shrike; 11-03-2004 at 22:28..
  
Reply With Quote
Re: Steam directory registry key.
Old
  (#7)
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

But then again im not an expert with the cklick team installer
Althoughj i saw they have new version out 8o
  
Reply With Quote
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 22:56..
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com