alfatec
asked on
Automatic login to domain Windows 7 computers
I currently use the following to autologin my workstations as an administrator.I call a batch file at the command prompt using the For command and a list of PC names that enables autologin and reboots:
For /f %i in (pc.txt) do call do.bat %i
DO.BAT
reg add "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v AutoAdminLogon /t REG_SZ /d 1 /f
reg add "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v DefaultDomainName /t REG_SZ /d YOURDOMAIN /f
reg add "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v DefaultUserName /t REG_SZ /d YOURUSERNAME /f
reg add "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v DefaultPassword /t REG_SZ /d YOURPASSWORD /f
shutdown /r /m "\\%1" /t 1 /f
When I am done I do this to disable the autologin and reboot:
For /f %i in (pc.txt) do call undo.bat %i
UNDO.BAT
reg add "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v AutoAdminLogon /t REG_SZ /d 0 /f
reg delete "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v DefaultUserName /f
reg delete "\\%1\HKLM\Software\Micros oft\Window s NT\CurrentVersion\Winlogon " /v DefaultPassword /f
shutdown /r /m "\\%1" /t 1 /f
Now this all works fine for Windows XP workstations but when I have applied this to
Windows 7 workstations I get an error stating 'The network path cannot be found'. As soon
as I send it to an XP workstation it is fine. Any help would be appreciated.
For /f %i in (pc.txt) do call do.bat %i
DO.BAT
reg add "\\%1\HKLM\Software\Micros
reg add "\\%1\HKLM\Software\Micros
reg add "\\%1\HKLM\Software\Micros
reg add "\\%1\HKLM\Software\Micros
shutdown /r /m "\\%1" /t 1 /f
When I am done I do this to disable the autologin and reboot:
For /f %i in (pc.txt) do call undo.bat %i
UNDO.BAT
reg add "\\%1\HKLM\Software\Micros
reg delete "\\%1\HKLM\Software\Micros
reg delete "\\%1\HKLM\Software\Micros
shutdown /r /m "\\%1" /t 1 /f
Now this all works fine for Windows XP workstations but when I have applied this to
Windows 7 workstations I get an error stating 'The network path cannot be found'. As soon
as I send it to an XP workstation it is fine. Any help would be appreciated.
ASKER
It throws it on the first line. The firewall is disabled on all workstations.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks for that Alan. The remote registry setting was set to manual in group policy. All works fine now.
Could be a firewall on the Win7 PCs?