Home > SCRIPTING > Forefront Client Security (FCS) Uninstallation Script

Forefront Client Security (FCS) Uninstallation Script

  • Sharebar

Script which you can use to uninstall Microsoft Forefront Client Security.

In this script you will see functions for removing Microsoft Forefront Client Security Antimalware Service and Microsoft Forefront Client Security State Assessment Service.

Rename the file with .vbs extension

Option Explicit

const HKEY_LOCAL_MACHINE = &H80000002
Dim SASProductName, SASProductKey, SSSProductName, SSSProductKey, Msg, MsgBoxStyle, RegKey

‘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub GetFCSKey()

dim oReg, sPath, aKeys, sName, sKey
Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)

sPath = “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
oReg.EnumKey HKEY_LOCAL_MACHINE, sPath, aKeys

For Each sKey in aKeys
oReg.GetStringValue HKEY_LOCAL_MACHINE, sPath & “\” & sKey, “DisplayName”, sName
If Not IsNull(sName) Then
if (sName = “Microsoft Forefront Client Security Antimalware Service”) then
SASProductKey = sKey
SASProductName = sName
end if
if (sName = “Microsoft Forefront Client Security State Assessment Service”) then
SSSProductKey = sKey
SSSProductName = sName
end if
end if
Next
end sub

‘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sub UninstallFCS(key, name)
dim cmd, objShell, iReturn, oshell

cmd = “C:\windows\system32\msiexec.exe /q/x ” & key
set objShell = wscript.createObject(“wscript.shell”)

objShell.LogEvent 0, “Removing the program [" & name & "] under Product Key [" & key & "]” & vbCrLf & “Executing command: ” & vbCrLf & cmd

iReturn=objShell.Run(cmd,1,TRUE)

if (iReturn = 0) then
objShell.LogEvent 0, “Program [" & name & "] was successfully removed”
else
objShell.LogEvent 0, “Failed to remove the program [" & name & "].”
end if

Set objShell = Nothing
end sub

‘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SASProductKey = “”
SASProductName = “”
SSSProductKey = “”
SSSProductName = “”

call GetFCSKey()

if Not (SASProductKey = “”) then
call UninstallFCS(SASProductKey, SASProductName)
end if

if Not (SSSProductKey = “”) then
call UninstallFCS(SSSProductKey, SSSProductName)
end if

‘~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  1. No comments yet.
  1. No trackbacks yet.

Uses wordpress plugins developed by www.wpdevelop.com Copy Protected by Chetans WP-Copyprotect.