Suppressing / Accepting warning windows automatically in commands executed through batch file

Posted by David Somach on Server Fault See other posts from Server Fault or by David Somach
Published on 2012-04-03T16:14:23Z Indexed on 2012/04/03 17:33 UTC
Read the original article Hit count: 306

Filed under:
|

I am automating the uninstall of IE9 through executing the command in these instructions inside a batch file: http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/how-to-uninstall-ie9-beta-64-bit-it-is-not-in-the/863d8f3d-c4ab-43e6-9d57-e163ea3baddd

The instructions say to run the command twice. The first time the command runs, I get the following error window (3 times):

"Windows Package Manager Operation failed with 0x80070005 Access id denied."

I click OK for each of these windows, and the rest of the script runs fine and IE8 is usable after restart.

Is there a way to suppress these windows? I want this to be fully automated and these windows block the script until the user presses "OK".

© Server Fault or respective owner

Related posts about windows-server-2008-r2

Related posts about cmd