Techieshelp.com

Delete Cookies On Workstation When User Logs Off VIA GPO

Microsoft Logo

Set keyboard Layout Via GPO

IT Problem

When you users on your network log off you want to delete all the local cookies so that the system is more secure with passwords etc. This can be done with a batch file that is called during the log off process.Delete cookies via gpo

IT Solution

Ok so first of all create a file called deletecookies.bat and then copy the text below into it. These commands clear all the local cookies.

@ECHO OFF
ECHO Removing all cookies from local machine
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
ECHO Cookie removal complete!

 

The copy the batch file on your domain controller to C:\Windows\SYSVOL\domain\scripts

Once done  you now need to create a group policy and modify the log off option to point to your script.

It can be found here. User Configuration>Windows Settings>Scripts (Logon/Logoff) > Logoff

 

now when a user logs off all the cookies are deleted.