In this post, I’ll explain how to delete files known as Flash cookies from a Windows computer using a batch file.
Most people are familiar with the concept of cookies – small files saved to your computer by the web sites you visit – and how to delete them. But there is a wide-spread misconception that simply deleting your cookies erases your tracks. Even when you’ve instructed your browser to delete cookies and browsing history, a potentially large collection of files remains, and the paths to these files contain the domain names of the sites that have placed them on your computer.
Local Shared Objects (LSO), commonly called Flash cookies, are collections of cookie-like data stored as a file on a user’s computer. LSOs are used by all versions of Adobe Flash Player…
With the default settings, Adobe Flash Player does not seek the user’s permission to store LSO files on the hard disk.
There is relatively little public awareness of LSOs, and they can usually not be deleted by the cookie privacy controls in a web browser.
The files are saved to two locations in the roaming profile:
As an example, a visit to YouTube will result in the following folders being created:
Create a text file with the following lines, then save it as deleteLSOs.bat. Run the batch file to delete and remake these folders, thereby clearing all of the subfolders and files.
@echo off copy "%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol" "%USERPROFILE%\Local Settings\Temp\settings.sol" rmdir /s /q "%APPDATA%\Macromedia\Flash Player\#SharedObjects" md "%APPDATA%\Macromedia\Flash Player\#SharedObjects" rmdir /s /q "%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys" md "%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys" copy "%USERPROFILE%\Local Settings\Temp\settings.sol" "%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol"
Note that the script backs up and then restores a settings.sol file that contains the Flash Player global settings, which can be managed from the Flash Player Settings Manager.
Deleting the entire directory that contains the Flash settings cookie is stupid, because, then you have to constantly reset your flash settings. Think!
It’s true that deleting the entire contents of “%APPDATA%MacromediaFlash Playermacromedia.comsupportflashplayersys” will also delete the settings.sol file that contains your Flash Player global settings. This file will be automatically recreated with the default settings.
I would assume that most users are running with the default settings anyway, but with a minor change to the script, you can back up that file before the folder is deleted, and then restore it after the folder is remade.
I’ve updated the script example to do this.
Thanks a lot. 🙂
Oliver, it’s simple and easy – default settings are really no issue for the vast majority of users. You always will have a ‘sharp-shooter’; however, no one else has stepped up to the plate. I thank you for posting this.
If you’re unaware, Radio Shack and its website operator, GSI Commerce Solutions Inc., are currently involved in a potential class action lawsuit, alleging the electronics retailer secretly tracked the Internet browsing activities of website visitors and shared this private information with third parties, utilizing LSOs.
your batch code is still, in 2018, helpful to kill permanent cookies and such stuff.
Thanks a lot!