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\ /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\ _
    /s:c:\temp\sandbox1 /quiet /norestart
del c:\temp\sandbox1\* /y
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: Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: