Jump to content

McAfee Agent Uninstall Failure


Recommended Posts

Any ideas why this would fail with no reaction? No error, log system or application logs.

I'm logged on with a domain admin account.

This is the line that fails even if I run it by itself

Run("C:\Program Files (x86)\McAfee\Common Framework\FrmInst.exe /FORCEUNINSTALL")

Ideally, the actual full script would be something like this.

I tested with msgbox's and the version checker and msgbox works fine up to the line before the Run command, but I can't get the command to actually run.

I tested running a notepad file that I moved to the same Common Framework directory and it ran without error. It's the FrmInst.exe that won't run.

Any help or suggestions would be great. We've got about 300 machines with McAfee's 4.0 agent installed and I need to get them up to speed with our other machines.

If @OSArch = "x64" Then
    $MCAFEE_AGENT_VER = FileGetVersion("C:\Program Files (x86)\McAfee\Common Framework\FrmInst.exe", "ProductVersion")
    If $MCAFEE_AGENT_VER < 4.9 Then
        'MsgBox(0,'','64 BIT START AGENT UNINSTALL')
        Run("C:\Program Files (x86)\McAfee\Common Framework\FrmInst.exe /FORCEUNINSTALL")
    EndIf
Else
    $MCAFEE_AGENT_VER = FileGetVersion("C:\Program Files\McAfee\Common Framework\FrmInst.exe", "ProductVersion")
    If $MCAFEE_AGENT_VER < 4.9 Then
        'MsgBox(0,'','32 BIT START AGENT UNINSTALL')
        Run("C:\Program Files\McAfee\Common Framework\FrmInst.exe /FORCEUNINSTALL")
    EndIf
EndIf

If @OSArch = "x64" AND FileExists("C:\Program Files (x86)\McAfee\Common Framework\FrmInst.exe") Then
    MsgBox(0,'', 'UNINSTALL FAILURE')
EndIf
Link to comment
Share on other sites

  • Developers

Try using #RequireAdmin at the top of the script and when that doesn't solve it try changing the workdir before running the program:

FileChangeDir("C:\Program Files (x86)\McAfee\Common Framework")
Run("FrmInst.exe /FORCEUNINSTALL")

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

your run command has 3 spaces in the path, that will fail everytime until you put some quotes around it  (another set, as the first set is for autoit, the second set, preferably of the single variety so you dont have to add even more quotes, will go with your string and should fix things)  or change your workingdir as Jos suggested.

run ("cmd /k C:\Program Files (x86)\McAfee\Common Framework\FrmInst.exe /FORCEUNINSTALL")

should bomb at the space between program and files until you put it in quotes, but will leave the cmd window up so you can see the error.  I tend to use cmd /k until the command works every test.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...