Jump to content

Registry Read Value integer


Recommended Posts

Can you please see whats wrong im doing in the below code? i can read few registry entry but not all for eg, i am able to get value of "Shell" Key from the registry path  but not AutoAdminLogon which has the value of "1", is there any change i have to do to read numeric values?

 Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell" )
 ConsoleWrite("This is Hello"& $shello)

above command returns proper value , but same command with AutoAdminLogon returns null as shown in below ? infact registry has the value of 1.

 Global  $shello = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon" )
 ConsoleWrite("This is Hello"& $shello)

Link to comment
Share on other sites

Try this:

Global $sReg

If @OSArch = "X64" Then
    $sReg = "64"
EndIf

$sFirstValue = RegRead("HKEY_LOCAL_MACHINE" & $sReg & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Shell")

$sSecondValue = RegRead("HKEY_LOCAL_MACHINE" & $sReg & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon")

ConsoleWrite("First Value: " & $sFirstValue & @CRLF)
ConsoleWrite("Second Value: " & $sSecondValue & @CRLF)

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...