I have a script that get a file containing pc name and logged in automatically
this scenario works fine for local account but for domain account it won't work actually computer boot up network won't initialize thats why it shows error on pcs "No logon server is found" means no network but after 1 minute it works by manually when network got initialized please modify a little so that it may take a pause after restarting about "1 minute" and then start logged in process (when network got initialize properly) below is the script
Set objFSO = CreateObject("Scripting.FileSystemObject")
set objShell = wscript.CreateObject("wscript.shell")
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
sUserName = InputBox("enter user name")
sPassword = InputBox("enter the password for the user")
Set oTS = objFSO.OpenTextFile("path of my txt file")
Do Until oTS.AtEndOfStream
strComputer = oTS.ReadLine
On Error Resume Next
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
sRegPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
' oReg.SetStringValue HKEY_USERS,strKeyPath,strValueName,strValue
oReg.SetStringValue HKEY_LOCAL_MACHINE,sRegPath,"AutoAdminLogon",1
oReg.SetStringValue HKEY_LOCAL_MACHINE,sRegPath,"DefaultUserName",sUserName
oReg.SetStringValue HKEY_LOCAL_MACHINE,sRegPath,"DefaultPassword",sPassword
'objShell.Run "shutdown.exe /R /T 5 /C"
objShell.Run "C:\Windows\System32\shutdown.exe /m \" & strComputer & " -r "
Loop
MsgBox ("Successfully Logged On values Set")
oTS.Close
WScript.Quit
Your kind help will be highly appreciated