Deployment Solution

 View Only

Use the Registry to Track Changes and Audit 

Apr 16, 2008 03:04 PM

A simple tip to track changes is to create a registry key under "HKLM\Software\

By creating these keys, it becomes very simple to create logic in DS deployment scripts to make decision trees for future deployments and upgrades. This is also helpful for future auditing.

REG (REG /? from a DOS prompt to get help) is a magnificent tool to add registry entries with through DOS and it’s built into XP SP2. It can also be used to Query your key. Vbscript uses RegWrite and RegRead to perform the same actions.

Good luck with your new tracking options!

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

May 13, 2008 03:48 PM

We use this with NS as well and have a custom inventory job that reports the registry keys back to the NS for reporting. If you adopt this practice, consider that you may need to address how to handle the registry key when an application is uninstalled, upgraded, etc.

May 02, 2008 04:03 PM

Swallen, that is a difficult question to answer. You are kind of forced to ease into it and have to use other methods until you can get some implementation time behind you. Add/remove programs and if file exists are sometimes but not always helpful. I will try to gather some other scripts to help you out with this.mte

Apr 28, 2008 08:36 AM

I have customers that do this for all of their packages. They normally use SWD to deploy them, and CustInv to read the reg values after the install so that they can receive confirmation that a specific application build has been installed onto that machine.
I like the idea of using such registry entries for DS.

Apr 18, 2008 01:36 PM

Good example. I'll use it for new installs. But what about upgrades where there aren't any new keys and I haven't, as of yet, created my own unique keys?

Apr 17, 2008 10:45 PM

I used this DOS script in task server to install the Microsoft C++ Redistributable Package. The registry key that it is querying is only present when the software is installed (my own detective work). So if the key does not exist, the "reg" command goes to an ERRORLEVEL of 1 and that can be used to evaluate if the software should be installed. If the error level is 0 (which would be the case if the registry key exists) then I just echo back that it's installed. The echoing is just my way of figuring out if the script ran correctly.
@echo off
setlocal
reg query HKLM\SOFTWARE\Microsoft\Devdiv\VC\Servicing\8.0\RED\1033 /v InstallerType
IF ERRORLEVEL 1 (
echo VCREDIS is not installed, installing...
msiexec.exe /package \\server\share\vcredist.msi /qn
echo VCREDIS is installed now.
) ELSE (
echo VCREDIS is installed already
)
GOTO :EOF

Apr 17, 2008 08:19 AM

Excellant tip. Can you provide some examples of how to use REG to query values in the registry?

Related Entries and Links

No Related Resource entered.