I need help making GPupdate /force
fully invisible to the user.
I've seen this in the past. Currently it answers a question to not log the user off the PC automatically but I would like to have the batch close visually but finish the gpupdate in the background.
@echo off
Title Internet Explorer Full Reset
::Close Internet Explorer tasks
taskkill.exe /f /im iexplore.exe
::Wait
timeout /t 4
::Performs reset on all settings for Internet Explorer
reg delete "HKCU\Software\Microsoft\Internet Explorer" /f
::Wait
timeout /t 2
::Clear all temporary internet files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
::Clear all cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
::Clear all form data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
::Wait
timeout /t 1
:: Set IE to always check for new versions of pages automatically
::reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /V SyncMode5 /t REG_DWORD /d 3 /f
::Wait
timeout /t 1
::Enable favorites bar in Internet Explorer
REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MINIE" /V "LinksBandEnabled" /D "00000001" /F
::Enable menu bar in Internet Explorer
REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MINIE" /V "AlwaysShowMenus" /D "00000001" /F
::Enable command bar in Internet Explorer
REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MINIE" /V "CommandBarEnabled" /D "00000001" /F
::Enable status bar in Internet Explorer
REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MINIE" /V "ShowStatusBar" /D "00000001" /F
::Relaunch Internet Explorer
start iexplore.exe
::Update Group Policy to bring all Internet Explorer settings back into compliance
echo N | gpupdate /force
::Schedule task to reboot at 11:59PM
::schtasks /create /sc once /tn restart /tr "shutdown -r -f ""restart""" /st 23:59
::Message To User
msg * "Please restart your computer to complete configuration changes when you are next able."