![]() |
#1 |
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. |
![]() |
![]() |
![]() |
#2 |
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
|
![]() |
![]() |
![]() |
#3 |
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. |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,352
|
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 |
![]() |
![]() |
![]() |
#5 |
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
![]() |
![]() |
![]() |
![]() |
|
Tags |
registry |
Thread Tools | Search this Thread |
Display Modes | |
|
|