Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

NEW Software update fail due to GPO - Remove Registry.pol

  • Thread starter Thread starter Nitin_ted
  • Start date Start date
  • Replies Replies 0
  • Views Views 2K

Nitin_ted

Well-Known Member
Messages
87
Solutions
1
Reaction score
2
Points
8
Hi Prajwal, i notice many devices not getting Monthly updates in device Software center. I checked and found it could be cause by group policy. After i remove registry.pol and gpupdate /force the machine, user get the updates in their software center (i tried in 2-3machines). since PS1 is blocked in user device I prepare .Bat file. I need to run this file in user machine using GPO (maybe task schedule every month) but i can't run since in-order to remove registry.pol file required to have admin access. I prepare 1 bat file. Can you please advise if below .bat works and where to put Admin ID and PWD?

@echo off

:: Check for administrator privileges
net session >nul 2>&1
if %errorLevel% == 0 (
goto :start
) else (
echo This script requires administrator privileges.
echo Please run this script as an administrator.
pause
exit /B
)

:start
:: Unhide GroupPolicy folder
attrib -h -r -s "C:\Windows\System32\GroupPolicy"

:: Delete Registry.pol file
del /f /q "C:\Windows\System32\GroupPolicy\Machine\Registry.pol"
runas /user:administrator "cmd /c gpupdate /force"

echo Group Policy updated successfully.
pause
 

Forum statistics

Threads
7,135
Messages
27,868
Members
18,159
Latest member
jordysmits
Back
Top