Old 19th April 2010, 12:00   #1
engg.mukesh
Junior Member
 
Join Date: Apr 2010
Posts: 2
How to check registry key type

I want to check that whether the registry key "Notification Packages" located at "HKLM\SYSTEM\ControlSet001\Control\Lsa" is of the type "String-Value (REG_SZ)" OR "MULTI-STRING VALUE (REG_MULTI_SZ)", using NSIS.

Please let me know how to do that.
engg.mukesh is offline   Reply With Quote
Old 19th April 2010, 12:37   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
http://nsis.sourceforge.net/Docs/AppendixD.html#D.5 - D.5 How to Read REG_MULTI_SZ Values
Animaether is offline   Reply With Quote
Old 19th April 2010, 13:11   #3
engg.mukesh
Junior Member
 
Join Date: Apr 2010
Posts: 2
The thing is before reading the registry entry I need to know that whether the registry is of type type "String-Value (REG_SZ)" OR "MULTI-STRING VALUE (REG_MULTI_SZ)".
In some system it is of type REG_SZ and others it is of type REG_MULTI_SZ.

Therefore, first of all I need to check the type and than accordingly read the previous value.
engg.mukesh is offline   Reply With Quote
Old 19th April 2010, 13:21   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
NSIS will not let you check the type, use the registry plugin or call the registry api functions directly with the system plugin

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 19th April 2010, 13:21   #5
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Part of the example code checks whether the type is REG_MULTI_SZ (it's the first check, actually) - leverage that
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
registry

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