Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

Uninstall one program and replace with another

$
0
0

Hi all,

I am trying to create a GPO that will uninstall McAfee Agent, HIPS and VSE then install Trend OfficeScan without leaving a machine unprotected for more than a few minutes.  I have tried various methods but each one uninstalls McAfee and then doesn't install Trend until after a couple of reboots, which leaves a full session unprotected if a user follows the normal pattern of shutting down in the evening and booting up in the morning.  I only want the GPO to install Trend on a machine that does not have McAfee so have a created:-

  • A script that uninstalls McAfee using msiexec and FrmInst.exe" /forceuninstall.
  • A GPO that sets an environment variable dependent upon the presence of McAfee Framework Service (0 if not present, 1 if present).
  • A WMI that checks for the an environment variable of 0.
  • A GPO that uses the WMI and installs Trend if the WMI returns true.

If I uninstall McAfee using a shutdown script then I want Trend to install at the next boot, thereby not leaving the computer unprotected.  I assume that the environment variable is being set after the WMI has checked its status as Trend does not install until the next restart.

My questions are:-

  • Can a GPO be prompted to install a package if a WMI can return a "false"?  This would mean that I don't have to use the environment variable at all.
  • Can I set the environment variable when in the shutdown script?  I have triedsetx variable "0" but it doesn't seem to work for me.
  • Am I approaching this all wrongly and is there an easy way to achieve this?

I would greatly appreciate any help with this because I really don't want to visit 300 computers to do this process manually.


Viewing all articles
Browse latest Browse all 19997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>