@echo off : FLASHFIX.BAT created 20070719 by wmc, Iterate Pte Ltd : This program creates a trust file for Macromedia Flash content : which is required in order to present Flash content from a CD : or from the local hard disk, due to Flash security settings. : rev: 20070720 by wmc, changed name of the trust file to assure uniqueness : create directory for trust file, if it doesn't exist (affects only the current user account) set fp_trust_filename=itr8_trustfile.cfg set fp_trust_directory="%userprofile%\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust" if /i not exist %fp_trust_directory%\* md %fp_trust_directory% : remove any existing trust file (and reset the errorlevel variable) if /i exist %fp_trust_directory%\%fp_trust_filename% del %fp_trust_directory%\%fp_trust_filename% : write trust file for current directory (eg- root folder of removable drive) echo # allow Flash content in named folders and subdirectories > %fp_trust_directory%\%fp_trust_filename% if /i not "%cd%" == "" echo %cd% >> %fp_trust_directory%\%fp_trust_filename% if errorlevel 1 goto flashfix_err2 : to be proactive, uncomment next line to add other likely removable drives (eg- 'd', 'e' and 'f') : for %%d in (d e f) do if /i not "%cd%" == "%%d:\" echo %%d:\ >> %fp_trust_directory%\%fp_trust_filename% if errorlevel 1 goto flashfix_err2 echo Successfully created Flash Player trust file. goto flashfix_exit :flashfix_err1 echo There was an error in creating the directory %fp_trust_directory%. goto flashfix_exit :flashfix_err2 echo There was an error in creating or updating the file %fp_trust_directory%\%fp_trust_filename%. goto flashfix_exit :flashfix_exit set fp_trust_filename= set fp_trust_directory= echo.