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
Find Directory
4 posts
Then use GetParent function, available in the NSIS manual under Useful Scripts to get X:\Path\To\Valve.
-StuFunction .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
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
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
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...
The function returns the Steam install path, so now all you need to do is check if the Counter-Strike source GCF files exist...
-Stu
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