Guest User

Untitled

a guest
Apr 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. if ( -not (Test-Path "$env:ProgramW6432\McAfee") -and -not(Test-Path "${env:ProgramFiles(x86)}\McAfee") ) { exit 0 }
  2.  
  3. $OriginalDate = Get-Date
  4.  
  5. # Set the date back to allow MFERemoval to run
  6. Set-Date -Date '01/01/2018'
  7.  
  8. # Run removal tool
  9. Start-Process -FilePath "$PWD\MFERemoval100.exe" -ArgumentList '/noreboot','/q','/all','/force' -Wait
  10.  
  11. # Revert the date
  12. Set-Date -Date $OriginalDate
  13.  
  14. # Sync the time
  15. Start-Process -FilePath W32tm.exe -ArgumentList '/resync','/force' -Wait
  16.  
  17. if ( -not (Test-Path "$env:ProgramW6432\McAfee") -and -not(Test-Path "${env:ProgramFiles(x86)}\McAfee") ) { exit 3010 }
  18.  
  19. exit 1
Add Comment
Please, Sign In to add comment