Uninstall IE 11 with script - fail with no error
The following script works just fine if it is ran from cmd, but not as a KACE script. The CMD line flashes and it looks like the packages is uninstalled but no change has been made to the system. After at restart, IE 11 i still installed. The log file says the script was run successfully.
FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart"
Any advice is appreciated
Regards
Haakon
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
olgonzo
9 years ago
for anyone still that needs this working via Kace , change how you call on cmd by using sysnative vairable , this only when targeting x64 windows.
FORFILES /P C:\Windows\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "C:\Windows\sysnative\cmd.exe /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /Verbose /norestart" >c:\logs\uninstallie.log
Posted by:
EdT
10 years ago
When the script "flashes", it may be displaying an error message, so the first thing I would do is to pipe the output of the command string to a file which you can examine after the script runs.
Just add > c:\logs\IE11Uninstall.log (or whatever path you prefer) to the end of your command line.
As a rule, I always include the full path to any executable I call, just in case the installation does not have a path variable set. So instead of cmd, I would use c:\windows\system32\cmd.exe.
Posted by:
jknox
10 years ago
Posted by:
haakon
10 years ago
Thanks to EdT and jknox for great suggestions. I have modified the script slightly and it seems that I am one step further, but IE 11 is still there.
FORFILES /P C:\Windows\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "C:\Windows\system32\cmd.exe /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /Verbose /norestart" >c:\logs\uninstallie.log
The script is working when I run it locally. If i try to run it form Kace with the same user it runs, with no error but IE won't be gone...