/build/static/layout/Breadcrumb_cap_w.png

Auto logon Scripted install Issues

I am looking to utilize the mid-level task in my scripted installs called  [CU] Auto Logon.  Has anyone found a way to use this task with a local user account rather than a domain account?  If so how did you accomplish this?  

Bat Script Below:

@echo off

set strUser="Username"

set strPassword="password"

set strDomain="Domain.com"

@echo on

@echo "Adding Auto Logon information"

@echo off


for %%I in (Z W V U S R Q P O N M L K J I H G F E D C) do (   

if exist %%I:\WINDOWS set WINDOWS_DRIVE=%%I:

)

reg load HKLM\TEMP_SOFTWARE %windows_drive%\windows\system32\config\software>Nul

set regKey="HKLM\TEMP_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

reg add %regKey% /v DefaultUserName /t REG_SZ /d %strUser% /f>Nul

reg add %regKey% /v DefaultPassword /t REG_SZ /d %strPassword% /f>Nul

reg add %regKey% /v DefaultDomainName /t REG_SZ /d %strDomain% /f>Nul

reg add %regKey% /v AutoAdminLogon /t REG_SZ /d 1 /f>Nul

reg unload HKLM\TEMP_SOFTWARE>Nul



0 Comments   [ + ] Show comments

Answers (1)

Posted by: horacior 2 years ago
Second Degree Brown Belt
0

I use this script as a batch file and the only value that you'll need to modify is username and password, Hopefully, this is what you are looking for.


@echo off

echo.

echo.

echo. 

echo.


set defaultun=USERNAME

set defaultpw=PASSWORD

set machinename=.

:begin

echo Creating automated login entries...

REG ADD "\\%machinename%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUsername /t REG_SZ /d %defaultun% /f

REG ADD "\\%machinename%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d %defaultpw% /f

REG ADD "\\%machinename%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f

echo.

echo complete!

:exit


Comments:
  • "." resolves to the computer name, I.E. to log into a local account on a domain joined PC you would use the format .\(LOCALUSER) - Kiyolaka 2 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ