Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 2nd October 2002, 01:21   #1
resista
Junior Member
 
Join Date: Oct 2001
Location: Sweden
Posts: 20
Send a message via ICQ to resista
How do you check if a registry entry exists?

I need to check if a registry entry exists! How do i do?
resista is offline   Reply With Quote
Old 2nd October 2002, 01:41   #2
o_cee
Junior Member
 
Join Date: Aug 2002
Posts: 17
From the help:

ReadRegStr user_var(output)
root_key
sub_key
name

Reads from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("") if the string is not present. If the value is present, but is of type REG_DWORD, it will be read and converted to a string and the error flag will be set.

PHP Code:
ReadRegStr $0 HKLM SoftwareMicrosoft "Foobar"
StrCmp $"" stringempty stringnotempty

stringempty
:
blahblahblah

stringnotempty
:
yddayaddayadda 
got it?
o_cee is offline   Reply With Quote
Old 2nd October 2002, 05:03   #3
resista
Junior Member
 
Join Date: Oct 2001
Location: Sweden
Posts: 20
Send a message via ICQ to resista
The Help also says:

The error flag will be set and $x will be set to an empty string ("") if the string is not present.
resista 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