Patch installations cause command windows to appear on client computers
search cancel

Patch installations cause command windows to appear on client computers

book

Article ID: 164970

calendar_today

Updated On:

Products

Patch Management Solution for Windows

Issue/Introduction

Deploying patches through Patch Management causes command windows (Dos prompts) to appear on client computers. The window appears to be caused by swuenv.bat running in "Normal" rather than "Hidden" mode. 

Environment

7.5, 7.6

Cause

Unknown, somehow the command lines are being switched from "Hidden" to "Normal" in the Item and SWDProgram tables. In one case this could be reproduced by deleting a policy, disabling the bulletin in the policy, then downloading the bulletin again and recreating the policy.

Resolution

To confirm the situation run the following query:

select * from SWDProgram
where SWDProgram.[Start Window] like 'Normal'
and SWDProgram.CommandLine like 'swuenv%'

Then confirm that the problem updates are listed with Start Window attributes of Normal rather than Hidden. To fix the commands and set them to Hidden run the following query:

begin tran
update Item
set State = REPLACE(CAST(State as nvarchar(max)),'startWindow="Normal"','startWindow="Hidden"')
where Guid in
(select SWDProgram.ProgramID from SWDProgram
where SWDProgram.[Start Window] like 'Normal'
and SWDProgram.CommandLine like 'swuenv%'
)
update SWDProgram
set [Start Window] = 'Hidden'
where ProgramId in
(select SWDProgram.ProgramId from SWDProgram
where SWDProgram.[Start Window] like 'Normal'
and SWDProgram.CommandLine like 'swuenv%'
)
commit