Jump to content

Recommended Posts

Posted

Hi all. I'm new in autoit.

I've write a service that check if a user i logged or not.

If not the script write some reg for autologin and reboot.

This work perfectly in xp but not in win7. I think that is a limit adding reg entry.

Someone know how to?

Posted

Thnk you JohnOne.

The code i use to write reg is:

Func AutoLogon($usernameFn, $passwordFn = "");Write autologon information to registry
    Local $tempRegkey = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon"
    RegWrite($tempRegkey, "DefaultUserName", "REG_SZ", $usernameFn)
    RegWrite($tempRegkey, "DefaultPassword", "REG_SZ", $userPasswordFn)
    RegWrite($tempRegkey, "AutoAdminLogon", "REG_SZ", "1")
    ;RegWrite($tempRegkey, "AutoLogonCount", "REG_DWORD", "1")
    RegWrite($tempRegkey, "DefaultDomainName", "REG_SZ", @ComputerName)
EndFunc  ;==>AutoLogon

i've tryed also with a bat file "RunAs" a machine user (admin) but with no effect...

Posted (edited)

if win7 is x64 then registry key names are different from x86

have a look >here or >here

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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
  • Recently Browsing   0 members

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