RSS

Specify a sandbox area when installing CAB files from network using PKGMGR

18 Apr

Pkgmgr.exe is a tool in Windows 2008 which you can use to install security patches in CAB files. In Windows 2008 R2, its called Dism.exe.

I have a batch file that would install the security patches on Windows 2008. All the cab file resides in a single folder \\server01\share\hotfix and the script residing in the same network share would run command like the following (for example):

pkgmgr /ip /m:\\server01\share\hotfix\windows6.0-kb982132-x86.cab /quiet /norestart

On most of the Windows 2008 servers I ran, this batch file works. However, on some servers, the pkgmgr would expand and extract all the contends into the shared folder, causing the rest of the security patch not to run.

I found out that I should use a sandbox to host the temp expanded files and delete them after that. So I amended my pkgmgr commands for each security patch to the following:

pkgmgr /ip /m:\\server01\share\hotfix\windows6.0-kb982132-x86.cab _
    /s:c:\temp\sandbox1 /quiet /norestart
del c:\temp\sandbox1\* /y
Advertisements
 
Leave a comment

Posted by on April 18, 2012 in Windows

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: