/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: olgonzo 8 years ago
Orange Belt
0
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 9 years ago
Red Belt
0
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 9 years ago
Red Belt
0
My guess is that your script needs administrator rights to uninstall.  By default, a Kscript is going to run as LocalSystem. Try using the "run as" feature and supplying admin credentials.
Posted by: haakon 9 years ago
Senior White Belt
0
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... 
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ