Obtaining a list of installed Software – Windows.

If you ever need to get an “extract” of installed applications on a Windows machine – then of course there is always more than one way to skin a cat!

Have a look at the following methods:

Without installing software or running exe’s (I know that, for example, Trend Micro’s HiJackThis has a button to do this) there are 3 methods I’ve found that can all produce a text based document of what is installed on a Windows machine.

These methods are using:

  1. Vbs script
  2. Batch file
  3. WMIC

1. VBS Script:

‘ List All Installed Software

Const HKLM = &H80000002 ‘HKEY_LOCAL_MACHINE
strComputer = “.”
strKey = “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\”
strEntry1a = “DisplayName”
strEntry1b = “QuietDisplayName”
strEntry2 = “InstallDate”
strEntry3 = “VersionMajor”
strEntry4 = “VersionMinor”
strEntry5 = “EstimatedSize”

Set objReg = GetObject(“winmgmts://” & strComputer & _
“/root/default:StdRegProv”)
objReg.EnumKey HKLM, strKey, arrSubkeys
WScript.Echo “Installed Applications” & VbCrLf
For Each strSubkey In arrSubkeys
intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, _
strEntry1a, strValue1)
If intRet1 <;>; 0 Then
objReg.GetStringValue HKLM, strKey & strSubkey, _
strEntry1b, strValue1
End If
If strValue1 <;>; “” Then
WScript.Echo VbCrLf & “Display Name: ” & strValue1
End If
objReg.GetStringValue HKLM, strKey & strSubkey, _
strEntry2, strValue2
If strValue2 <;>; “” Then
WScript.Echo “Install Date: ” & strValue2
End If
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry3, intValue3
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry4, intValue4
If intValue3 <;>; “” Then
WScript.Echo “Version: ” & intValue3 & “.” & intValue4
End If
objReg.GetDWORDValue HKLM, strKey & strSubkey, _
strEntry5, intValue5
If intValue5 <;>; “” Then
WScript.Echo “Estimated Size: ” & Round(intValue5/1024, 3) & “ megabytes”
End If
Next

Source:  http://www.vbsedit.com/scripts/apps/user/scr_226.asp

2. Batch file:

Open Notepad.exe and paste in the following:

echo List of softwares > software_list.txt
echo ================= >>software_list.txt
reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt
find “DisplayName” temp1.txt| find /V “ParentDisplayName” > temp2.txt
for /f “tokens=2,3 delims==” %%a in (temp2.txt) do (echo %%a >> software_list.txt)

del temp1.txt temp2.txt

Save the file as “software list.bat” (minus the quotation marks).
Run the bat file and allow to complete. A file will be created called “software_list.txt” with your reasults.

Source:  Prince Hancey – TechRepublic

3. Windows Management Instrumentation Command

WMIC is a tool built into windows. Use the following command from within Command Prompt:

wmic product > c:\product.txt

The above command will create a file on C: called products.txt. Apparently this output imports nicely into Excel too for any other formatting or data processing needs.

Sources:  ngruloos and  subs – TechRepublic

Please note for Windows 2000 you will need to use the MOF method as described here:

http://technet.microsoft.com/en-us/library/ee692772.aspx#EBAA

Related posts:

  1. Windows 7 “Snapping” Windows – in Ubuntu Compiz!
  2. Windows Apps – Beat The Recession
  3. Mapping Windows Shares in Mac OS X Lion (10.7)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>