MotorolaWorldwide
Search
Service ProvidersBusinessConsumers

Retrieving the list of installed applications registered in the Add/Remove Programs control panel of PC Agents

Almost every Windows application available today registers itself with Windows' Add/Remove Programs control panel. This information is stored in the registry and can be retrieved by administrators to find out what software is installed on each workstation. This how-to document describes how you can use Execute PC Installer to remotely execute a batch file on Agent machines and retrieve the list of installed applications registered on PC Agent machines. This requires that the Agent machine to have an existing COMPUTERNAME environment variable. Windows NT and 2000 Agent machines already come with a COMPUTERNAME environment variable built in as a part of the OS.

Because neither Windows 9X nor Windows Me have a COMPUTERNAME environment variable you will have to create one on each Windows 9X/Me Agent machine that you want to retrieve the list of registered applications from. This can be done simply by using Execute PC Installer to run the provided COMPUTERNAME script on the desired Agent machines.

computername.exe

This document assumes that you have a high familiarity with netOctopus' Execute PC Installer command. If this is not the case take some time to review pages 157-159 of the netOctopus User's Guide or the following Execute PC Installer How-to Guide. Note that you will need to reboot the Agent machines after you have run the COMPUTERNAME script for the environment variable to become effective. To verify that the COMPUTERNAME environment variable has been created after the reboot, run the following command in an MS-DOS window: echo %computername%.

You will then need to create the PMSI.BAT* batch file that will query the PC Agent machines to retrieve the list of registered installed applications:

     @echo off
     set destination=\\server\share
     %comspec% /e:2048/c for %%v in (1 2) do prompt set {date}$q$d$_ |  find/v "$" >{t}.bat
     for %%v in (call del) do %%v {t}.bat
     echo %{date}% - Installed applications registered on %computername%: >> %destination%\%computername%.apps.txt
     echo. >> %destination%\%computername%.apps.txt
     start /wait regedit /e %temp%.\~tmp HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
     find "DisplayName" < %temp%.\~tmp | find /v "QuietDisplayName" >> %destination%\%computername%.apps.txt
    del %temp%.\~tmp
    exit

Replace "\\server\share" in the second line with the UNC path to the location where you want the PMSI batch file to output its list of registered installed applications for the PC Agent machines. The output from each Agent machine will be named <computername>.apps.txt and placed in the destination path that you have specified.

Place the PMSI.BAT file on a server share (for convenience use the same share that you have specified in the previous paragraph) and use Execute PC Installer to remotely run this batch file on the desired Agent machines. After the batch file has finished executing on all of the target Agent machines, check the ouput location to view the listing of registered installed applications on your Agent machines.

Installed applications registered on TITANIA.

"DisplayName"="Adobe Acrobat 4.0"
"DisplayName"="FinePrint 2000"
"DisplayName"="Microsoft Office 2000 Professional"
"DisplayName"="Microsoft Outlook Express 5"
"DisplayName"="netOctopus Admin"
"DisplayName"="InstallRite 2.5"
"DisplayName"="Netscape Navigator 4.08"
"DisplayName"="WinZip"
"DisplayName"="Timbuktu Pro"
"DisplayName"="CuteFTP Pro"
"DisplayName"="netOctopus PC Agent 3.6"

Note that this procedure only works if a user is currently logged into the Agent machine with Microsoft networking. This document assumes that you have a high familiarity with netOctopus' Execute PC Installer command. If this is not the case take some time to review pages 157-159 of the netOctopus User's Guide or the following Execute PC Installer How-to Guide.

* Much of PMSI.BAT is modified code from Frank-Peter Schultze's Batch Scripting Site


www.motorola.com  |  Terms of Use  |  Privacy Statement   |  Media Center  |  Site Map  |  Contact Us
© 2008 Netopia, Inc., a Motorola Company. All rights reserved.