We help IT Professionals succeed at work.

running bat file logon script in GPO issue

piaakit
piaakit asked
on
Dear All


               i'm planning to create a GPO for running the bat login screen with below command, just wonder do i need to input anything in the "script parameters" field ? and by looking at the GPO setting, it shows no settings defined, is that normal ? the aim of creating this GPO is to let the client report back to WSUS server, any help would be appreicated

1
2


wuauclt.exe /detectnow /reportnow
wuauclt /resetauthorization /detectnow
net stop wuauser
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /f /v SusClientId
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /f /v SusClientIdValidation
net start wuauserv
wuauclt /resetauthorization /detectnow


net stop wuauserv  
net stop cryptSvc
net stop bits  
net stop msiserver  
#Rename SoftwareDistribution and Catroot2 folder. Type these command and press Enter after each command:  
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old  
ren C:\Windows\System32\catroot2 Catroot2.old  

net start wuauserv  
net start cryptSvc  
net start bits  
net start msiserver  

wuauclt.exe /resetauthorization
wuauclt.exe /r /detectnow
wuauclt.exe /reportnow
Exit /B
Comment
Watch Question

Mal OsborneAlpha Geek
CERTIFIED EXPERT

Commented:
Nothing needs to be in the "script parameters" field, for this script.

If you put something there, it would just be concatenated when the script was run. Ie, if you added a parameter Server01, then the GPO would run wsus1.bat Server01.  This is for scripts which accept a command line option, which is not uncommon, but not what you need.

Author

Commented:
by looking at the GPO, it show empty setting under computer configuration, is that normal, suppose it will show the setting


1
Simple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
If you don't change any settings then yes user and computer configuration would be empty

Author

Commented:
as you see from the top I have changed and added the scripts for this GPO, but i still see it empty

Author

Commented:
having wait for next day, i could see it now