Archive: registry key question


registry key question
hi .. kind of a newbie question... im trying to make my installer write a registry key..

lets say my stuff extracts to C:\newfolder\

there is a file called this.exe and configurationfile.config

i want it to run in background so the string would be
this.exe -b configurationfile.config

this is what i have so far
HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "svchosts" '"this.exe" -b "configurationfile.config"'

as you can see this is wrong because i dont know how to put in the directory "C:\newfolder\"

would the string be like this?
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "svchosts" C:\newfolder\'"this.exe" -b "configurationfile.config"'


I guess you should do it this way:

Assumption: Your Setup dir is "C:\newfolder\" as you wrote you can do it this way:


WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "svchosts" "%$INSTDIR\this.exe" -b configurationfile.config"


If you check the registry you should find it this way under "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

"svchosts" "C:\newfolder\this.exe" -b configurationfile.config"

ok thanks man