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

Windows Auto Login with prompted Username

$
0
0
Hi,
I am new to AUTOIT and I'm trying to create a .exe that will prompt for username and then pass it into a reg key.

This what I've got so far




Local $username = InputBox("AutoIt Example", "Please type in the username eg ""XXXX-Till"" and click OK")


#cs
Enables AutoLogon
#ce
RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "1")
#cs
Set USERNAME
#ce
RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", "$username")
#cs
Set PASSWORD
#ce
RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", "password")
#cs
Set DOMAIN
#ce
RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", "Domain")


Currently it just sets the DefaultUsername to $username in the reg key

If someone could point me in the right direction that would be great.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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