Sp33dy Gonzale$
22nd June 2005 15:12 UTC
Find Directory
Hy I know that it gives an post here how is similarly but I'm not understand how I make this. (I'am German so my English isn't very good)
I would make for my Counter-Strike Mod an Function with that my installer automatically find if counter-Strike is installed or not. The Regpath is HKLM "SOFTWARE\Valve\Steam" "InstallPath"
The Script must be installed in But the script has to be installed in
Valve\
How can I make this could you make me an Code which I only mus paste ?
Please help me
Afrow UK
22nd June 2005 15:45 UTC
http://nsis.sourceforge.net/archive/...instances=0,11
Then use GetParent function, available in the NSIS manual under Useful Scripts to get X:\Path\To\Valve.
Function .onInit
Call GetSteamAccountName
Pop $R0 ; account name e.g. afrow uk
Pop $R1 ; steam path e.g. C:\Valve\Steam
Push $R1
Call GetParent
Pop $INSTDIR
FunctionEnd
-Stu
Sp33dy Gonzale$
22nd June 2005 17:59 UTC
Hy thank you for your reply
But i've write this script for a noun steamversion. And there is the path e.g. C:\Programs\Valve
How can I do this ?
There musn't be found an account name... only the patch where the game was installed must be found.
Thank you
Afrow UK
22nd June 2005 18:15 UTC
Please use your imagination!
The function returns the Steam install path, so now all you need to do is check if the Counter-Strike source GCF files exist...
Function .onInit
Call GetSteamAccountName
Pop $R0 ; account name e.g. afrow uk
Pop $R1 ; steam path e.g. C:\Valve\Steam
IfFileExists "$R1\SteamApps\counter-strike source client.gcf" 0 +2
IfFileExists "$R1\SteamApps\counter-strike source shared.gcf" +3
MessageBox MB_OK|MB_ICONSTOP "CS:Source not installed!"
Abort
Push $R1
Call GetParent
Pop $INSTDIR
FunctionEnd
-Stu