Modify

Opened 6 years ago

Closed 6 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 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by anonymous

comment:1 Changed 6 years ago by Jpm

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 Changed 6 years ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.