Hello,
I've been trying to figure out how to write "$1" to the registry key without luck.
I want the value of my key to be "...QuickShortcut.exe $1", unfortunately the $1 is seen as a variable and it doesn't work.
WriteRegStr HKCR "*\shell\QuickApp\command" "" "$INSTDIR\QuickShortcut.exe $1"
Any suggestions?
Write "$1" as the value of a registry key
9 posts
$$1.
Stu
Stu
Thank you,
should be
"$INSTDIR\QuickShortcut.exe $\"$1$\""
if $1 contains spaces, eg path
"$INSTDIR\QuickShortcut.exe $\"$1$\""
if $1 contains spaces, eg path
Shouldn't that be $\"$$1$\"" , then?
Yes, or how about: `"$INSTDIR\QuickShortcut.exe" "$$1"`?
Stu
Stu
erm - NO - should not $$1 - cause it already was treated as text in ""
this one puts "blabla"
$$ is used if you want to write the number or string of variable
eg messagebox mb_ok "value $$R9: '$R9'"
similar to \\ in dialogs with input boxes.
this one puts "blabla"
with $$1 it puts "$1\$1" "$1" which is wrong.;--------------------------------
;Configuration
SetCompressor /SOLID LZMA
ShowInstDetails nevershow
AutoCloseWindow true
OutFile "test.exe"
;--------------------------------
Section ""
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
StrCpy $1 "blabla"
WriteRegStr HKCR "*\$1\command" "" "$\"$1\$1$\" $\"$1$\""
Messagebox MB_OK "Keypress"
DeleteRegKey HKCR "*\$1"
Quit
FunctionEnd
;--------------------------------
$$ is used if you want to write the number or string of variable
eg messagebox mb_ok "value $$R9: '$R9'"
similar to \\ in dialogs with input boxes.
Yes, and that's exactly what this thread is about...Originally Posted by Brummelchen View Post$$ is used if you want to write the number or string of variable
$1 is a nsis variable - i dont thinks this was purpose.
otherwise typo and it should have been %1 as a context variable of windows
$$1 makes neither nor sense.
otherwise typo and it should have been %1 as a context variable of windows
$$1 makes neither nor sense.