Startup script GPO not working

I have a GPO startup script that is supposed to apply to all desktops in a given OU every startup. It used to work, but recently stopped doing so. I have checked gpresult /r on the affected machines, and the GPO is listed as being applied. I don't understand what could have happened. I have not made any OU or GPO adjustments. The GPO scope is "Authenticated Users", and again, this has not been changed since GPO creation. Here is the script:

@echo off

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v KUserinitReplaced /t REG_SZ /d "C:\Program Files\VMware\VMware View\Agent\bin\wssm.exe",C:\Windows\system32\userinit.exe,"C:\Program Files\VMware\VMware View\Agent\bin\vmlm_helper.exe","C:\Program Files\VMware\VMware View\Agent\bin\wssm.exe" /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Userinit /t REG_SZ /d C:\Windows\system32\KUsrInit.exe,"C:\Program Files\VMware\VMware View\Agent\bin\wssm.exe", /f

Open in new window

I have tested manually running the script on a test machine, and it works like a charm. Any idea what could be going wrong here?
Dustin23IT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_beeDirector of Information TechnologyCommented:
You might be better off using Group Policy Preferences to accomplish this tasks.  

Here is a link that will help you accomplish this.
https://theitbros.com/add-modify-and-delete-registry-keys-using-group-policy/
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lionel MMSmall Business IT ConsultantCommented:
I don't understand what could have happened. Unfortunately this may be due to changes in Windows and/or some new conflict with other settings and/or issues or conflicts with what the settings you are trying to set. The best thing to do take one system and manually remove these settings, reboot, and then manually add them back, reboot and see if these settings apply--if not then there is something else going on other than your startup script or your registry changes.
0
McKnifeCommented:
You can simulate startup script processing using psexec.
Download psexec, then, on an elevated command prompt, launch
psexec -s -I cmd
on the cmd shell which will open, launch your startup script from the path where it is saved inside the policy (\\yourdom.local\policies\someGPO\machine\scripts\yourscript.bat)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dustin23IT DirectorAuthor Commented:
I am going to reboot the DC tonight to complete some updates anyway. I will see if that resolves the issue. I am already looking into Group Policy Preferences to see if that will work for me, thanks for the suggestion. Also, psexec sounds like a nice tool, I will try that out if I get nothing from a reboot.
0
Dustin23IT DirectorAuthor Commented:
Ok, a reboot did not fix the issue with the script. I decided to go with registry settings in GPP. Oddly, creating a update action for each item didn't work. So, I decided to create a replace action for each item, set to run once, and a replace action for each item that applies every time gpupdate is run. This resolved the issue, and should be good moving forward. Thanks for the assistance on this guys.
0
yo_beeDirector of Information TechnologyCommented:
Glad that the suggestion worked
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.