I have tried to uninstall an AV application using windows software distribution wizard.
I have pushed the file to endpoint, copied it to temp folder. Ran the application from there.
But it is removing source exe file while running the application. and getting failed.
Here is the code I’ve used. Correct the code if required pls
While running last line, it is removing the source file instead of running.
In actions status showing completed with exit code 0, log showing command succeeded.
I have performed 2 tests.
When I ran the command which mentioned above, it is copying file from _download to C:\temp and trying to run command. At that point of time, source file “MFERemoval100.exe” getting removed from C:/ temp .
Are you sure the source file was ever placed there?
Does the folder C:\Temp exist in the first place? Generally you SHOULD NOT put files there and instead use C:\Windows\Temp or similar location in ProgramData, but also the copy operation will fail if the folder doesn’t already exist.
Have you tested to make sure this works on the command line OUTSIDE of BigFix?
It also didnot work…
I have provided the path C:\Malware , by creating that folder first. Script creating folder and copying the file but not executing the exe
Try adding a few debug clauses - a continue if statement that confirms the file is where you expect it for example
You could expand it to also check file size and/or hash to be sure it has survived the upload, download, extract and move intact.
delete "C:\windows\temp\MFERemoval100.exe"
copy "__Download\MFERemoval100.exe" "C:\windows\temp\MFERemoval100.exe"
continue if {exists file "MFERemoval100.exe" of folder "temp" of windows folder}
wait cmd /C /S "C:\windows\temp\MFERemoval100.exe /All /silent"
I created almost exactly this fixlet for our AV team a few months ago - the hash and size are different, meaning we were provided a slightly different version of the utility, but the command line I used is
I have used this on as well…
When it comes to the “wait” line, the source file (MFERemoval100.exe) is getting removed from the path. an d installation getting failed.
In my code, Im moving the file to C:\Malware and executing from there. Till copying, it is working fine.
I have used debugger to run the wait command line it is giving error "Program is expired and it will delete itself."
As console cant give the error, it was completed with exit code 0, but not ran on endpoint.