
Quote from rcohen on March 12, 2022, 3:24 amI am trying to check the existence of a specific reg entry and if it's there. When there isn't the existence of said key, the system throws an error (non valid key)
Is there a way to check to see if a key exists without throwing an error ?
Thanks
I am trying to check the existence of a specific reg entry and if it's there. When there isn't the existence of said key, the system throws an error (non valid key)
Is there a way to check to see if a key exists without throwing an error ?
Thanks

Quote from Vadim on March 12, 2022, 6:49 am@rcohen
Yes, you can simply turn off the error display. For example:
ShowErrors "False"
RegistryRead "HKEY_CURRENT_USER" "Software\NeoSoft\NeoBook 5\Tools\NeoCommands" "[NCToolsYes]"
If "[NCToolsYes]" "<>" ""
SetVar "[NCTools]" "checked"
EndIf
ShowErrors "True"
Yes, you can simply turn off the error display. For example:
ShowErrors "False"
RegistryRead "HKEY_CURRENT_USER" "Software\NeoSoft\NeoBook 5\Tools\NeoCommands" "[NCToolsYes]"
If "[NCToolsYes]" "<>" ""
SetVar "[NCTools]" "checked"
EndIf
ShowErrors "True"

Quote from rcohen on March 12, 2022, 6:53 amHi @vadim,
yes, same suggestion from Zaeem ;-) I was hoping for something more graceful ;-) I generally like to keep ShowErrors to True in case there is a need for it, but I guess I can turn that back on when done testing...
Perhaps it's time for a "RegKeyExists" function?
Thanks
Hi @vadim,
yes, same suggestion from Zaeem ;-) I was hoping for something more graceful ;-) I generally like to keep ShowErrors to True in case there is a need for it, but I guess I can turn that back on when done testing...
Perhaps it's time for a "RegKeyExists" function?
Thanks

Quote from Vadim on March 12, 2022, 6:58 am@rcohen
There are new commands that I haven't tried yet, maybe they can help (look in the debugger to see what comes back when the key you're looking for isn't there):
RegistryReadKeyList = Read the list of keys of the Windows registry section.
RegistryReadSectionList = Read a list of all Windows registry hives.You can also use the dec_Plus 1.9 plugin (David Esperalta)
Check key: dec_SaberSiExisteUnaClave
Check the parameter: dec_SaberSiExisteUnValor (this command caused a hang of the IDE in my experience)
There are new commands that I haven't tried yet, maybe they can help (look in the debugger to see what comes back when the key you're looking for isn't there):
RegistryReadKeyList = Read the list of keys of the Windows registry section.
RegistryReadSectionList = Read a list of all Windows registry hives.
You can also use the dec_Plus 1.9 plugin (David Esperalta)
Check key: dec_SaberSiExisteUnaClave
Check the parameter: dec_SaberSiExisteUnValor (this command caused a hang of the IDE in my experience)

Quote from rcohen on March 12, 2022, 8:19 amThanks @Vadim,
I took your (and Zaeem's) suggestion and switched off error reporting. At some point we'll have another solution too ;-) I spotted the additional reg commands, but they didn't seem like they'd offer me what I was looking for. I thought for a second about doing a ReadSectionList and looking for my key, but... that was a long way around ;-0
Anyway, we got it working ;-)
Thanks for your input, as always.
Thanks @Vadim,
I took your (and Zaeem's) suggestion and switched off error reporting. At some point we'll have another solution too ;-) I spotted the additional reg commands, but they didn't seem like they'd offer me what I was looking for. I thought for a second about doing a ReadSectionList and looking for my key, but... that was a long way around ;-0
Anyway, we got it working ;-)
Thanks for your input, as always.

Quote from Krakerman on March 12, 2022, 4:04 pmDid you look at this plugin https://www.decsoftutils.com/Humm/Sites/Main/Views/Data/NeoPlugins/Plugins/npmine/index.html
Did you look at this plugin https://www.decsoftutils.com/Humm/Sites/Main/Views/Data/NeoPlugins/Plugins/npmine/index.html

Quote from rcohen on March 12, 2022, 6:59 pm@krakerman,
Thanks for the link, and no this is one I hadn't noticed, thanks for showing it to me. Seems pretty cool, but I have already coded around the problem. I will take a closer look at this one for when I'm needing more.
Thank you sir.
Thanks for the link, and no this is one I hadn't noticed, thanks for showing it to me. Seems pretty cool, but I have already coded around the problem. I will take a closer look at this one for when I'm needing more.
Thank you sir.

Quote from AsleyCruz on March 13, 2022, 9:36 amHi @rcohen
I have in use a plugin to work with the registry.
It is not released yet, but if you are interested in buying the plugin, I could work on it ASAP,
If not, the plugin will be released one of these days.These are some actions of the plugin:
• Set string
• Set Expanded string
• Set Dword
• Set Binary
• Set any string• Get string
• Get Expanded string
• Get Dword
• Get Binary
• Get any string• Exist key
• Exist value• Delete key
• Delete value• Enumerate keys
• Enumerate values• Find key
• Find valueALL actions are boolean as a result, this means that there won't be any error on screen.
Regards.
Hi @rcohen
I have in use a plugin to work with the registry.
It is not released yet, but if you are interested in buying the plugin, I could work on it ASAP,
If not, the plugin will be released one of these days.
These are some actions of the plugin:
• Set string
• Set Expanded string
• Set Dword
• Set Binary
• Set any string
• Get string
• Get Expanded string
• Get Dword
• Get Binary
• Get any string
• Exist key
• Exist value
• Delete key
• Delete value
• Enumerate keys
• Enumerate values
• Find key
• Find value
ALL actions are boolean as a result, this means that there won't be any error on screen.
Regards.

Quote from rcohen on March 13, 2022, 7:22 pmHi @asleycruz,
The fact of the matter is that I don't mess with registry often and in fact this is the first time I'm doing this. I normally keep registration details in an encrypted file. I'm glad to see the "key exist" command though... was thinking we should probably have that as part of the default reg commands in VNW. This time, turning off error reporting worked
Thank you for the heads up.
Hi @asleycruz,
The fact of the matter is that I don't mess with registry often and in fact this is the first time I'm doing this. I normally keep registration details in an encrypted file. I'm glad to see the "key exist" command though... was thinking we should probably have that as part of the default reg commands in VNW. This time, turning off error reporting worked
Thank you for the heads up.