%WINDIR%\system32\tskill.exe /a /v %%i* > " %LOGPATH%\ %LOGFILE% " 2 > NUL REM this loop contains the processes we should killįor %%i in (battle,chrome,firefox,silverlight,iexplore,iexplorer,opera,palemoon,plugin-container,skype,steam,yahoo) do ( REM Kill all browsers and running Silverlight instancesĬall : log " %CUR_DATE% %TIME% Looking for and closing all running browsers and Silverlight instances. :: FORCE-CLOSE PROCESSES :: - Do we want to kill Silverlight before running? If so, this is where it happens Title Silverlight Nuker v %SCRIPT_VERSION% ( %SCRIPT_UPDATED%) :: different binaries for reg.exe and various other Windows utilities This affects some commands later, because XP uses slightly :: Create the log directory if it doesn't exist :: This is useful if we start from a network share converts CWD to a drive letter :: Get the date into ISO 8601 standard format (yyyy-mm-dd) so we can use itįOR /f %%a in ('WMIC OS GET LocalDateTime ^| find ". :: = Think of everything below this line like a feral badger: Look, but Do Not Touch = :: Set FORCE_CLOSE_PROCESSES_EXIT_CODE = 1618 :: Exit code to use when FORCE_CLOSE_PROCESSES is "no" and a potential Silverlight-dependent process is detected ![]() :: If you change this to 'no', the script will exit with an error code if it thinks Silverlight could be in use. :: specifically want to abort the script if the target machine might possibly be using Silverlight. :: Force-close processes that might be using Silverlight? Recommend leaving this set to 'yes' unless you Set LOGFILE = %COMPUTERNAME%_microsoft_silverlight_nuker.log :: * Network paths are okay (okay: \\server\share name ) :: * Spaces are okay (okay: %SYSTEMDRIVE%\my folder\with spaces ) :: * NO trailing slashes on the path! (bad: %SYSTEMDRIVE%\directory\ ) :: * NO quotes! (bad: "%SYSTEMDRIVE%\directory\path" ) ![]() The defaults should work fine though - :: :: VARIABLES :: - Set these to your desired values. :: Author: vocatus on /r/sysadmin ( ) // PGP key ID: 0x82A211A2 :: Requirements: Run this script with an admin account :: Purpose: Removes all versions of Microsoft Silverlight from a system.
0 Comments
Leave a Reply. |