Jump to content

Regestry changes


Johanvn
 Share

Recommended Posts

Hello,

I'm trying to create a script that writes a key to the regestry.

When I run the script the key is added to the wrong regestry

Im running windows 7 64bit

when I run the script it is added in the 64bit regestry but I need it in the 32 bit regestry.

the code thqt I use is

regwrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon", "AutoAdminLogon", "REG_SZ", "1")

Thanks for the help

Edited by Johanvn
Link to comment
Share on other sites

You should test carefully exactly what is happening in your script because as far as I know the OS deals with what key to use in most cases (Assuming you do not disable registry redirection.

Before you write to wow64, you might want to think about if you need this directive.

#AutoIt3Wrapper_UseX64=n

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

 

the 32bit registry key on 64bit windows 7 is  HKEY_LOCAL_MACHINESOFTWAREWow6432Node

 

Your code should be something like this.

regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "1")

Tried this, the key is added but when I reboot the pc he does not auto logon with the defined user

when I change the keys I mentionned befor it works.

Link to comment
Share on other sites

You should test carefully exactly what is happening in your script because as far as I know the OS deals with what key to use in most cases (Assuming you do not disable registry redirection.

Before you write to wow64, you might want to think about if you need this directive.

#AutoIt3Wrapper_UseX64=n

I don't want to write in wow64, The scripts does this I don't know why

Link to comment
Share on other sites

So:

If @AutoItX64 then
    MsgBox(0,"","Runing as x64")
Else
    MsgBox(0,"","Runing as x86")
    endif

For Writing I think, it should be so:

#RequireAdmin

$return=RegWrite("HKLM64\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","REG_SZ", "1")

saludos

Edited by Danyfirex
Link to comment
Share on other sites

So:

If @AutoItX64 then
    MsgBox(0,"","Runing as x64")
Else
    MsgBox(0,"","Runing as x86")
    endif

For Writing I think, it should be so:

#RequireAdmin

$return=RegWrite("HKLM64\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon","REG_SZ", "1")

saludos

It works.

It seems that when I add the pc to the domain these registry keys change also but this helped me alot

thx all

Edited by Johanvn
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...