Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Regread does not seem to be working under x64

$
0
0

Strange issue.  We have been using 32bit workstations until recently.  I have a very simple script to run Autologon from sysinternals, then read the value of a regkey, and disable the logoff button if needed

AutoIt         
#Requireadmin DirCreate("C:\AutoitTemp") FileInstall("C:\Autologon.exe", "C:\AutoitTemp\Autologon.exe") RunWait("C:\AutoitTemp\autologon.exe -accepteula") $IsAutoLogonEnabled = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon")    MsgBox(0, "Info", $isautologonenabled) If $IsAutoLogonEnabled = 1 Then    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer", "StartMenuLogoff", "REG_DWORD", 1)    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoLogoff", "REG_DWORD", 1)    MsgBox(0, "Info", "Logoff Disabled")    EndIf If $IsAutoLogonEnabled = 0 Then    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer", "StartMenuLogoff", "REG_DWORD", 0)    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoLogoff", "REG_DWORD", 0)    MsgBox(0, "Info", "LogOff Button Enabled") EndIf DirRemove("C:\AutoitTemp", 1)

the problem is, on x64 windows 7, the value seems to come back as NULL.  Works fine on 32bit.  If I compile the script as x64 it DOES work, but then will not run on 32bit.....

 

ideas?


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>