Archive: WriteRegStr issue


WriteRegStr issue
Hello everyone,

I recently became a fan of NSIS, its ease of use and expansion capabilities are astonishing. However, I encountered an issue while trying to register a string to the Windows Registry.

My application recieves a parameter, like so : <Application> "Parameter". Notice the double quotes (") present - put there so that when inputing a parameter such as "C:\Documents and Settings", the path is recognized correctly (with spaces).

I need to associate this kind of parameter handling into the Registry, by creating a new key to HKCR\Folder\[..].

The NSIS code I used is :
WriteRegStr HKCR "Folder\Shell\1. Tag using MyTag\command" "" "$INSTDIR\MyTag.exe "%1"".

From that snippet, the compiler error issued is "WriteRegStr expects 4 parameters, got 5".

Therefore, is there a way of making the compiler know that I require the " Char, not that I'm adding an extra parameter?Is there a special code for this or something like that (eg. In Delphi, for example, to diferentiate between the ' Char and the ' used for delimiting a string, the '' Chars are used)?

Thank you in advance!


n00b alert
Well you can delete the thread, this n00b has found out about the NSIS Wiki in an instant and the FAQ proved to be able to get me out of my troubles.

Thank you :)