Modify

Opened 12 years ago

Closed 12 years ago

#2712 closed Bug (No Bug)

RegDelete, RegRead and RegWrite operate on the wrong "keyname".

Reported by: carlmcz@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

RegDelete, RegRead and RegWrite operate on the wrong "keyname".
Is this a bug in AutoIt?
Or, maybe I'm failing to understand something about Win7_x64.

--- Description ---
This script is a Windows 7_x64 Update installer.
The computer needs to restart several times to install all updates.
The following code snip allows Windows to auto-logon to a user's account.

--- Code snip: On Win7_x64, this works. ---
Func UserAccount_AutoLogOn( $AccountName=@UserName, $Password=0 )

$Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

RegWrite( $Key, "AutoAdminLogon", "REG_SZ", "1" )
RegWrite( $Key, "DefaultUserName", "REG_SZ", $AccountName )

If $Password Then

RegWrite( $Key, "DefaultPassword", "REG_SZ", $Password )

Else

RegDelete( $Key, "DefaultPassword" )

EndIf

EndFunc

--- Code snip: On Win7_x64, this DOES NOT WORK. ---
#pragma compile(x64, false) ;<--- THIS CAUSES THE PROBLEM

Func UserAccount_AutoLogOn( $AccountName=@UserName, $Password=0 )

$Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

RegWrite( $Key, "AutoAdminLogon", "REG_SZ", "1" )
RegWrite( $Key, "DefaultUserName", "REG_SZ", $AccountName )

If $Password Then

RegWrite( $Key, "DefaultPassword", "REG_SZ", $Password )

Else

RegDelete( $Key, "DefaultPassword" )

EndIf

EndFunc

It does not operate on...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

It operates on...
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Winlogon

Attachments (1)

Demo.zip (5.8 KB ) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 12 years ago

Attachment: Demo.zip added

comment:1 by J-Paul Mesnage, 12 years ago

You enconter the registry remapping between an .exe running in 32-bit mode unde a X64-bit OS
THere is no bug from AutOit neither from Windows at least that they want to implement ...

comment:2 by Jos, 12 years ago

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.