Clicking OK on error

Started by mcvpjd3, February 10, 2014, 01:56:22 AM

Previous topic - Next topic

mcvpjd3

Hi folk, I'm writing a small script to uninstall versions of Internet Explorer to get back to version 8 (later versions can cause issues with some of our applications).

I've written a scipt that checks what version of IE you have, and then uses a dos call to get a list of all the relevant .mum files in C:\Windows\servicing\packages. The script then runs pkgmgr with the relevant switches and packages name to do the uninstalling. The problem is that sometimes, on some machines it pops up a message saying Access Denied. I've been told that clicking OK on this should be fine, the uninstall will happen anyway, however, how to I run the pkgmgr command, wait to see if this pops up and if it does, click OK (and if not then get on with the next package).

Anyone done this before?

Thanks

Deana

The WinWaitExist function has a timeout parameter. this function will return zero if the window did not appear with in the timeout period. Make sure the timeout specified is greater than the amount of time it could ever possibly take for that window to appear.
Deana F.
Technical Support
Wilson WindowWare Inc.

td

Quote from: mcvpjd3 on February 10, 2014, 01:56:22 AM
Hi folk, I'm writing a small script to uninstall versions of Internet Explorer to get back to version 8 (later versions can cause issues with some of our applications).

I've written a scipt that checks what version of IE you have, and then uses a dos call to get a list of all the relevant .mum files in C:\Windows\servicing\packages. The script then runs pkgmgr with the relevant switches and packages name to do the uninstalling. The problem is that sometimes, on some machines it pops up a message saying Access Denied. I've been told that clicking OK on this should be fine, the uninstall will happen anyway, however, how to I run the pkgmgr command, wait to see if this pops up and if it does, click OK (and if not then get on with the next package).

Anyone done this before?

Thanks

Since it is a system error it may not work but have you tried using pkgmgr.exe's quiet mode switch (/quiet)?  The exe also has an answer file command line option but it may not be possible to use an answer file entry for an interment error message box.

http://technet.microsoft.com/en-us/library/cc749465(v=ws.10).aspx
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

jtrask

I know this thread has been dead awhile, but I'm just now running into this very issue.

I find that running PkgMgr.exe "As Administrator" doesn't work.  I get the Access Denied message.  I can log in as Administrator and run the same command and it works flawlessly.

The above is true when I run it via the command prompt.  I'm having a different set of problems when executing PkgMgr.exe via RunShell.  I'll start a new thread for those.

Deana

Quote from: jtrask on June 25, 2014, 11:07:39 AM
I know this thread has been dead awhile, but I'm just now running into this very issue.

I find that running PkgMgr.exe "As Administrator" doesn't work.  I get the Access Denied message.  I can log in as Administrator and run the same command and it works flawlessly.

The above is true when I run it via the command prompt.  I'm having a different set of problems when executing PkgMgr.exe via RunShell.  I'll start a new thread for those.

As Tony posted...it appears that the /quiet switch can possibly help resolve this issue: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_28015560.html
Deana F.
Technical Support
Wilson WindowWare Inc.