Force WU Install remotely via VBS

  • Thread starter Thread starter Kurt G
  • Start date Start date
K

Kurt G

Guest
I have been working with a VBScript (UpdateHF.vbs) written by Rob Dunn to see
if I can do a force install of updates on remote workstations in my
environment. I have been successful for systems which have no users logged
in, however when a non-admin user is logged in to the system, the
installation fails. There are two parts of the WindowsUpdate log which seem
significant to the success or failure of the update installation.

<b>Non Admin logged in / Failed Installation</b>
2007-07-09 07:23:36:471 1088 b10 Agent *************
2007-07-09 07:23:36:471 1088 b10 Agent ** START ** Agent: Installing
updates [CallerId = ]
2007-07-09 07:23:36:471 1088 b10 Agent *********
2007-07-09 07:23:36:471 1088 b10 Agent * Updates to install = 1
2007-07-09 07:23:36:471 1088 b10 Agent * Title = Office XP Service Pack 3
2007-07-09 07:23:36:471 1088 b10 Agent * UpdateId =
{BE1F4943-76F2-4195-B7E0-9C2539D8BFDC}.53
2007-07-09 07:23:36:471 1088 b10 Agent * Bundles 2 updates:
2007-07-09 07:23:36:471 1088 b10 Agent *
{2CF8A36B-0595-4604-B31E-ECE285284987}.53
2007-07-09 07:23:36:471 1088 b10 Agent *
{9D6A2972-3BC9-4923-A8F5-AAD9ED329E06}.53
2007-07-09 07:23:37:565 1088 f28 Report REPORT EVENT:
{DFC717D7-A559-48FC-87B4-5797533B52D2} 2007-07-09
07:23:32:562-0700 1 147 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Software
Synchronization Windows Update Client successfully detected 1 updates.
2007-07-09 07:23:37:565 1088 f28 Report REPORT EVENT:
{026BB316-9E0C-4C92-AC12-FFCAC48F4275} 2007-07-09
07:23:32:562-0700 1 156 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Pre-Deployment Check Reporting client status.
2007-07-09 07:23:58:358 1088 b10 Handler Attempting to create remote handler
process as EGREEN\kgazow in session 0
2007-07-09 07:23:58:702 1088 b10 Handler FATAL: 0x80070005: ERROR: Remote
update handler container process created (PID: 1692), but exited before
signaling event
2007-07-09 07:23:58:921 1088 b10 Agent * WARNING: Exit code = 0x80070005
2007-07-09 07:23:58:921 1088 b10 Agent *********
2007-07-09 07:23:58:921 1088 b10 Agent ** END ** Agent: Installing
updates [CallerId = ]
2007-07-09 07:23:58:921 1088 b10 Agent *************
2007-07-09 07:23:58:921 1088 b10 Agent WARNING: WU client failed installing
updates with error 0x80070005

<b>No logged in user / successful installation</b>
2007-07-09 07:07:07:013 668 e1c COMAPI -------------
2007-07-09 07:07:07:013 668 e1c COMAPI -- START -- COMAPI: Install
[ClientId = <NULL>]
2007-07-09 07:07:07:013 668 e1c COMAPI ---------
2007-07-09 07:07:07:013 668 e1c COMAPI - Allow source prompts: Yes;
Forced: No; Force quiet: No
2007-07-09 07:07:07:013 668 e1c COMAPI - Updates in request: 1
2007-07-09 07:07:07:013 668 e1c COMAPI - ServiceID =
{3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}
2007-07-09 07:07:07:013 668 e1c COMAPI - Updates to install = 1
2007-07-09 07:07:07:013 668 e1c COMAPI <<-- SUBMITTED -- COMAPI: Install
[ClientId = <NULL>]
2007-07-09 07:07:07:013 1072 980 Agent *************
2007-07-09 07:07:07:013 1072 980 Agent ** START ** Agent: Installing
updates [CallerId = ]
2007-07-09 07:07:07:013 1072 980 Agent *********
2007-07-09 07:07:07:013 1072 980 Agent * Updates to install = 1
2007-07-09 07:07:07:013 1072 980 Agent * Title = Office XP Service Pack 3
2007-07-09 07:07:07:013 1072 980 Agent * UpdateId =
{BE1F4943-76F2-4195-B7E0-9C2539D8BFDC}.53
2007-07-09 07:07:07:013 1072 980 Agent * Bundles 2 updates:
2007-07-09 07:07:07:013 1072 980 Agent *
{2CF8A36B-0595-4604-B31E-ECE285284987}.53
2007-07-09 07:07:07:013 1072 980 Agent *
{9D6A2972-3BC9-4923-A8F5-AAD9ED329E06}.53
2007-07-09 07:07:08:122 1072 e90 Report REPORT EVENT:
{A0D04706-F6B9-4C5B-B133-73EC79BCCF4C} 2007-07-09
07:07:03:106-0700 1 147 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Software
Synchronization Windows Update Client successfully detected 1 updates.
2007-07-09 07:07:08:122 1072 e90 Report REPORT EVENT:
{11FA0FAA-C577-4E98-8630-B3FFEB88A075} 2007-07-09
07:07:03:106-0700 1 156 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Pre-Deployment Check Reporting client status.
2007-07-09 07:07:26:701 1072 980 Service WARNING: GetUserTokenFromSessionId
failed with error 800704dd for session 0

The problem seems to be somehow linked to the launch of the notifier in
session 0 when the logged on user is not an administrator. Any ideas on how
to combat this situtation when it is called from a VB Script?

Kurt
 
'Turn on XP SP2 warning suppression (The "are you sure you want to run this
program?" warning box)
Set WshShell = WScript.CreateObject("Wscript.shell")
Set oEnv = WshShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1

'Turn off XP SP2 warning suppression (because we don't want it turned off
all the time)
oEnv.Remove("SEE_MASK_NOZONECHECKS")

"Kurt G" wrote:

> I have been working with a VBScript (UpdateHF.vbs) written by Rob Dunn to see
> if I can do a force install of updates on remote workstations in my
> environment. I have been successful for systems which have no users logged
> in, however when a non-admin user is logged in to the system, the
> installation fails. There are two parts of the WindowsUpdate log which seem
> significant to the success or failure of the update installation.
>
> <b>Non Admin logged in / Failed Installation</b>
> 2007-07-09 07:23:36:471 1088 b10 Agent *************
> 2007-07-09 07:23:36:471 1088 b10 Agent ** START ** Agent: Installing
> updates [CallerId = ]
> 2007-07-09 07:23:36:471 1088 b10 Agent *********
> 2007-07-09 07:23:36:471 1088 b10 Agent * Updates to install = 1
> 2007-07-09 07:23:36:471 1088 b10 Agent * Title = Office XP Service Pack 3
> 2007-07-09 07:23:36:471 1088 b10 Agent * UpdateId =
> {BE1F4943-76F2-4195-B7E0-9C2539D8BFDC}.53
> 2007-07-09 07:23:36:471 1088 b10 Agent * Bundles 2 updates:
> 2007-07-09 07:23:36:471 1088 b10 Agent *
> {2CF8A36B-0595-4604-B31E-ECE285284987}.53
> 2007-07-09 07:23:36:471 1088 b10 Agent *
> {9D6A2972-3BC9-4923-A8F5-AAD9ED329E06}.53
> 2007-07-09 07:23:37:565 1088 f28 Report REPORT EVENT:
> {DFC717D7-A559-48FC-87B4-5797533B52D2} 2007-07-09
> 07:23:32:562-0700 1 147 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Software
> Synchronization Windows Update Client successfully detected 1 updates.
> 2007-07-09 07:23:37:565 1088 f28 Report REPORT EVENT:
> {026BB316-9E0C-4C92-AC12-FFCAC48F4275} 2007-07-09
> 07:23:32:562-0700 1 156 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Pre-Deployment Check Reporting client status.
> 2007-07-09 07:23:58:358 1088 b10 Handler Attempting to create remote handler
> process as EGREEN\kgazow in session 0
> 2007-07-09 07:23:58:702 1088 b10 Handler FATAL: 0x80070005: ERROR: Remote
> update handler container process created (PID: 1692), but exited before
> signaling event
> 2007-07-09 07:23:58:921 1088 b10 Agent * WARNING: Exit code = 0x80070005
> 2007-07-09 07:23:58:921 1088 b10 Agent *********
> 2007-07-09 07:23:58:921 1088 b10 Agent ** END ** Agent: Installing
> updates [CallerId = ]
> 2007-07-09 07:23:58:921 1088 b10 Agent *************
> 2007-07-09 07:23:58:921 1088 b10 Agent WARNING: WU client failed installing
> updates with error 0x80070005
>
> <b>No logged in user / successful installation</b>
> 2007-07-09 07:07:07:013 668 e1c COMAPI -------------
> 2007-07-09 07:07:07:013 668 e1c COMAPI -- START -- COMAPI: Install
> [ClientId = <NULL>]
> 2007-07-09 07:07:07:013 668 e1c COMAPI ---------
> 2007-07-09 07:07:07:013 668 e1c COMAPI - Allow source prompts: Yes;
> Forced: No; Force quiet: No
> 2007-07-09 07:07:07:013 668 e1c COMAPI - Updates in request: 1
> 2007-07-09 07:07:07:013 668 e1c COMAPI - ServiceID =
> {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}
> 2007-07-09 07:07:07:013 668 e1c COMAPI - Updates to install = 1
> 2007-07-09 07:07:07:013 668 e1c COMAPI <<-- SUBMITTED -- COMAPI: Install
> [ClientId = <NULL>]
> 2007-07-09 07:07:07:013 1072 980 Agent *************
> 2007-07-09 07:07:07:013 1072 980 Agent ** START ** Agent: Installing
> updates [CallerId = ]
> 2007-07-09 07:07:07:013 1072 980 Agent *********
> 2007-07-09 07:07:07:013 1072 980 Agent * Updates to install = 1
> 2007-07-09 07:07:07:013 1072 980 Agent * Title = Office XP Service Pack 3
> 2007-07-09 07:07:07:013 1072 980 Agent * UpdateId =
> {BE1F4943-76F2-4195-B7E0-9C2539D8BFDC}.53
> 2007-07-09 07:07:07:013 1072 980 Agent * Bundles 2 updates:
> 2007-07-09 07:07:07:013 1072 980 Agent *
> {2CF8A36B-0595-4604-B31E-ECE285284987}.53
> 2007-07-09 07:07:07:013 1072 980 Agent *
> {9D6A2972-3BC9-4923-A8F5-AAD9ED329E06}.53
> 2007-07-09 07:07:08:122 1072 e90 Report REPORT EVENT:
> {A0D04706-F6B9-4C5B-B133-73EC79BCCF4C} 2007-07-09
> 07:07:03:106-0700 1 147 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Software
> Synchronization Windows Update Client successfully detected 1 updates.
> 2007-07-09 07:07:08:122 1072 e90 Report REPORT EVENT:
> {11FA0FAA-C577-4E98-8630-B3FFEB88A075} 2007-07-09
> 07:07:03:106-0700 1 156 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Pre-Deployment Check Reporting client status.
> 2007-07-09 07:07:26:701 1072 980 Service WARNING: GetUserTokenFromSessionId
> failed with error 800704dd for session 0
>
> The problem seems to be somehow linked to the launch of the notifier in
> session 0 when the logged on user is not an administrator. Any ideas on how
> to combat this situtation when it is called from a VB Script?
>
> Kurt
 
Thanks for the quick reply, Mike! I added these lines in, but am still
getting a failure, indicated by the following:
2007-07-09 10:15:29:322 1088 b9c Handler Attempting to create remote handler
process as EGREEN\kgazow in session 0
2007-07-09 10:15:29:713 1088 b9c Handler FATAL: 0x80070005: ERROR: Remote
update handler container process created (PID: 2532), but exited before
signaling event
2007-07-09 10:15:29:869 1088 b9c Agent * WARNING: Exit code = 0x80070005
2007-07-09 10:15:29:869 1088 b9c Agent *********
2007-07-09 10:15:29:869 1088 b9c Agent ** END ** Agent: Installing
updates [CallerId = ]
2007-07-09 10:15:29:869 1088 b9c Agent *************
2007-07-09 10:15:29:869 1088 b9c Agent WARNING: WU client failed installing
updates with error 0x80070005
2007-07-09 10:15:29:885 3448 f3c COMAPI >>-- RESUMED -- COMAPI: Install
[ClientId = <NULL>]
2007-07-09 10:15:29:885 3448 f3c COMAPI - Install call failed
2007-07-09 10:15:29:885 3448 3c8 COMAPI WARNING: Operation failed due to
earlier error, hr=80070005
2007-07-09 10:15:29:885 3448 3c8 COMAPI FATAL: Unable to perform synchronous
installation successfully.

Kurt
 
Kurt;

Sorry, but I guess I jumped the gun a little and assumed i knew what you
were needing. I too use a VBscript to deploy patches, but i deliver the
script via SMS (don't ask, it's a long story). In any event, I don't have
any answers for you. I simply add those pieces to the beginning and end of
my script and it supresses the warning dialog. I am unfamiliar with the
script you are using, I will look around a little and see if I can find
something to help you out.

"Kurt G" wrote:

> Thanks for the quick reply, Mike! I added these lines in, but am still
> getting a failure, indicated by the following:
> 2007-07-09 10:15:29:322 1088 b9c Handler Attempting to create remote handler
> process as EGREEN\kgazow in session 0
> 2007-07-09 10:15:29:713 1088 b9c Handler FATAL: 0x80070005: ERROR: Remote
> update handler container process created (PID: 2532), but exited before
> signaling event
> 2007-07-09 10:15:29:869 1088 b9c Agent * WARNING: Exit code = 0x80070005
> 2007-07-09 10:15:29:869 1088 b9c Agent *********
> 2007-07-09 10:15:29:869 1088 b9c Agent ** END ** Agent: Installing
> updates [CallerId = ]
> 2007-07-09 10:15:29:869 1088 b9c Agent *************
> 2007-07-09 10:15:29:869 1088 b9c Agent WARNING: WU client failed installing
> updates with error 0x80070005
> 2007-07-09 10:15:29:885 3448 f3c COMAPI >>-- RESUMED -- COMAPI: Install
> [ClientId = <NULL>]
> 2007-07-09 10:15:29:885 3448 f3c COMAPI - Install call failed
> 2007-07-09 10:15:29:885 3448 3c8 COMAPI WARNING: Operation failed due to
> earlier error, hr=80070005
> 2007-07-09 10:15:29:885 3448 3c8 COMAPI FATAL: Unable to perform synchronous
> installation successfully.
>
> Kurt
 
Kurt; According to the forum thread here:
http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=199&start=1

your issue may be with a GPO. Take a look, apparently your not the only one
with this issue.

"Mike Coleman" wrote:

> Kurt;
>
> Sorry, but I guess I jumped the gun a little and assumed i knew what you
> were needing. I too use a VBscript to deploy patches, but i deliver the
> script via SMS (don't ask, it's a long story). In any event, I don't have
> any answers for you. I simply add those pieces to the beginning and end of
> my script and it supresses the warning dialog. I am unfamiliar with the
> script you are using, I will look around a little and see if I can find
> something to help you out.
>
> "Kurt G" wrote:
>
> > Thanks for the quick reply, Mike! I added these lines in, but am still
> > getting a failure, indicated by the following:
> > 2007-07-09 10:15:29:322 1088 b9c Handler Attempting to create remote handler
> > process as EGREEN\kgazow in session 0
> > 2007-07-09 10:15:29:713 1088 b9c Handler FATAL: 0x80070005: ERROR: Remote
> > update handler container process created (PID: 2532), but exited before
> > signaling event
> > 2007-07-09 10:15:29:869 1088 b9c Agent * WARNING: Exit code = 0x80070005
> > 2007-07-09 10:15:29:869 1088 b9c Agent *********
> > 2007-07-09 10:15:29:869 1088 b9c Agent ** END ** Agent: Installing
> > updates [CallerId = ]
> > 2007-07-09 10:15:29:869 1088 b9c Agent *************
> > 2007-07-09 10:15:29:869 1088 b9c Agent WARNING: WU client failed installing
> > updates with error 0x80070005
> > 2007-07-09 10:15:29:885 3448 f3c COMAPI >>-- RESUMED -- COMAPI: Install
> > [ClientId = <NULL>]
> > 2007-07-09 10:15:29:885 3448 f3c COMAPI - Install call failed
> > 2007-07-09 10:15:29:885 3448 3c8 COMAPI WARNING: Operation failed due to
> > earlier error, hr=80070005
> > 2007-07-09 10:15:29:885 3448 3c8 COMAPI FATAL: Unable to perform synchronous
> > installation successfully.
> >
> > Kurt
 
Mike,

No wirres; I appreciate the help! What seems to be the common thread is the
attempt to create the remote handler in session 0. If no-one is logged in,
the installation will spawn and complete successfully. The attempt to find
session 0 will fail and the installation will proceed nonetheless. When
there is a non-admin session 0, it seems to error out and fail all the
installs as a group.

If there is any way to suporess this, or redirect it to a non-existant
session so that it will "fail normally" rather than terminate unexpetedly,
perhaps that would work.

Kurt
 
FIXED:

The trick was to disable the AllowSourcePrompts and enable ForceQuiet, per a
reccommendation for service pack installs. To do so, the following lines
were added:

installer.AllowSourcePrompts = False
installer.ForceQuiet = True

That's it!
Kurt
 
Back
Top