Hello, I'm writing an extremely basic script that writes Registry elements at logon.
Unfortunately, I can't write these elements without UAC's approval, so I'm in a bind.
To give a short description of what I"m doing:
I have a cybercafe image I'm building. This cafe build has automatic login configured. I set the following values:
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "ForceAutoLogon", "REG_SZ", "0")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "1")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", "cybercafe")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", "")
If I don't set this at startup, the automatic logon fails at next reboot. I'm sure there's some hex value out there that I'm not setting, but my research online has turned up nothing and the very same registry changes work permanently for XP, so I've chalked it up to yet another Vista "bug".
In any case, here's what I'm preceding these lines with:
#RequireAdmin
WinWait("User Account Control")
Send("mypassword {ENTER}")
Unfortunately UAC halts the application from running, it's not just a dialog where AutoIt can type in the password. So now I'm stuck.
I've tried running a wsf using the following as an admin:
RunAsWait('cafeadmin','.','mypassword',1,'wscript c:\windows\1_auto_login.wsf')
I keep getting a script error stating that access is denied.
If someone could help me on this, that would be fantastic. I'm going to keep digging but at this point I'm about to pull my hair out.