Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 23rd July 2001, 15:33   #1
sbostin
Junior Member
 
Join Date: Jul 2001
Posts: 4
Send a message via AIM to sbostin
I am attempting to read a Dword value from a registry key, write a value to that key, and then write the original value back to the key when I am done. My code looks like this:

; first I read the current values
ReadRegStr $0 HKEY_CURRENT_USER "Software\Whatever" "User Name"
ReadRegStr $1 HKEY_CURRENT_USER "Software\Whatever\Users\$0" "SpecialKey"

; then I write the temporary value
WriteRegDword HKEY_CURRENT_USER "Software\Whatever\Users\$0" "SpecialKey" 0x1

; I do some unrelated stuff here

; then I try to write back the original value
WriteRegDword HKEY_CURRENT_USER "Software\Whatever\Users\$0" "SpecialKey" $1

I have also tried 0x$1, "$1", "0x$1", etc. as values in the final WriteRegDword. The statement is failing specifically on that variable because, when I replace it with 0x0, it works just fine.

Does this mean that you can only read and write string variables with NSIS? Is there a workaround?

Thoughts?
sbostin is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump