C:\Games\Steam\SteamApps\ncesky@hotmail.com\counter-strike
The problem is, every user will have a different email address, and I can't seem to find a registry value that points me there. So far I can get NSIS to:
C:\Games\Steam
How would I make a function that then adds SteamApps to the end of that... and then finds a folder with the @ symbol, adds that folder as well, and then adds counter-strike ... ?
Here's my code so far, I would appreciate some help, I'm still sort of new to the scripting, and even what I have still confuses me at times...
At this point $9 becomes C:\Games\Steam on my machine... also the uninstall string reads
Function getParent
Exch $0 ; old $0 is on top of stack
Push $1
Push $2
StrCpy $1 -1
loop:
StrCpy $2 $0 1 $1
StrCmp $2 "" exit
StrCmp $2 "\" exit
IntOp $1 $1 - 1
Goto loop
exit:
StrCpy $0 $0 $1
Pop $2
Pop $1
Exch $0 ; put $0 on top of stack, restore $0 to original value
FunctionEnd
Function findSteam
ReadRegStr $9 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Steam" \
"UninstallString"
Push $9
Call getParent
Call getParent
Call getParent
Call getParent
Pop $9
FunctionEnd
C:\Games\Steam\UNWISE.EXE C:\Games\Steam\INSTALL.LOG