Delete Cookies On Workstation When User Logs Off VIA GPO


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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: