Hi,
do you know how to check the registry section exist? Because i can only check the value of an existing section, but how to detect if this section exist?
RegistryRead "HKEY_CURRENT_USER" "username" "[usernamevariable]"
Thank you!
D
RegistryRead
Moderator: Neosoft Support
-
- NeoSoft Team
- Posts: 5628
- Joined: Thu Mar 31, 2005 10:48 pm
- Location: Oregon, USA
- Contact:
Re: RegistryRead
NeoSoft Support
Re: RegistryRead
Thank you,
but this link was not work. Any other link?
Thank you
D
but this link was not work. Any other link?
Thank you
D
Re: RegistryRead
The link is ok for me. Here is the function from Michael Weiner:
Code: Select all
{NeoBook Function}
Version=5.80
Language=VBScript
Comment=regKeyExists|Function for NeoBook for Windows|Version 1.1|By Michael Weiner <mailto:neobook@cogit.net>|23 September 2015|This function determines whether a registry key exists.
Param=[%root]|Text|Registry root (HKCR, HKCU, HKLM, HKUS, or HKCC)
Param=[%key]|Text|Registry key (Example: Software\Microsoft\Windows)
Param=[%exists]|Variable|Registry key exists (True or False)
{End}
Const HKCR = &H80000000 'HKEY_CLASSES_ROOT
Const HKCU = &H80000001 'HKEY_CURRENT_USER
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
Const HKUS = &H80000003 'HKEY_USERS
Const HKCC = &H80000005 'HKEY_CURRENT_CONFIG
Dim oReg: Set oReg = GetObject("winmgmts:!root/default:StdRegProv")
If oReg.EnumKey([%root], "[%key]", arrSubKeys) = 0 Then
publication.nbSetVar "[%exists]", True
Else
publication.nbSetVar "[%exists]", False
End If
Greetings from Germany
Klaus
Klaus
Re: RegistryRead
Thank you! I'm beginner in Neobook i made this VBscript but how to execute it?
Re: RegistryRead
If you try this.
Put the code in Button or ...
Put the code in Button or ...
Code: Select all
RegistryRead "HKEY_CURRENT_USER" "username" "[usernamevariable]"
if "[usernamevariable]" "=" ""
alertbox "REGISTRY USER" "NOT' USER EXISTS"
setvar "[theuser]" "Virger"
RegistryWrite "HKEY_CURRENT_USER" "username" "[theuser]"
else
alertbox "User Registry Name" "[usernamevariable]"
endif
COSTA RICA
PURA VIDA
PURA VIDA
Re: RegistryRead
Thanks Virger,
this is what I need
Thanks buddy!
D
this is what I need
Thanks buddy!
D