Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

What is the best software that can find all softwares installed on all machines in the network and dump the data to a excel file. Without any client traces in the machines.

Hi,

What is the best software that can find all softwares installed on all machines in the network and dump the data to a excel file. Without any client traces in the machines.

Regards
Sharath
Avatar of Admin4XP
Admin4XP

Hi,

You could do this with a script.... Here is a copy of a script I use to dump the software on the local machine off. With a bit of jigging it could do remote machines... Or you could put it in the logon scripts to dump it all to a network path...
Set objShell = CreateObject("WScript.Shell") 
Set objFSO = CreateObject("Scripting.FileSystemObject") 
Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") 
strRegIdentityCodes = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" 
strRegComputerName = "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName" 
strComputerName = objShell.RegRead(strRegComputerName) 
Const HKLM = &H80000002 
Const APPEND = 8 
strFileOut = strComputerName & " Inventory.txt" 
If objFSO.FileExists(strFileOut) Then 
Set objFileOut = objFSO.OpenTextFile(strFileOut, APPEND) 
objFileOut.WriteLine("") 
Else 
Set objFileOut = objFSO.CreateTextFile(strFileOut) 
End If 
objFileOut.WriteLine("Inventory for " & strComputerName & " at " & Now) 
objFileOut.WriteLine("Computer Name" & vbTab & "Identity Code" & vbTab & "Display Name" & vbTab & _ 
"Display Version" & vbTab & "Install Date" & vbTab & "Uninstall String" & vbTab & _ 
"Quiet Uninstall String") 
objReg.EnumKey HKLM, strRegIdentityCodes, arrIdentityCode 
On Error Resume Next 
For Each strIdentityCode in arrIdentityCode 
strRegIdentityInfo = "HKLM\" & strRegIdentityCodes & "\" & strIdentityCode & "\" 
strDisplayName = objShell.RegRead(strRegIdentityInfo & "DisplayName") 
strDisplayVersion = objShell.RegRead(strRegIdentityInfo & "DisplayVersion") 
strInstallDate = objShell.RegRead(strRegIdentityInfo & "InstallDate") 
strUninstallString = objShell.RegRead(strRegIdentityInfo & "UninstallString") 
strQuietUninstallString = objShell.RegRead(strRegIdentityInfo & "QuietUninstallString") 
objFileOut.WriteLine(strComputerName & vbTab & strIdentityCode & vbTab & strDisplayName & vbTab & _ 
strDisplayVersion & vbTab & strInstallDate & vbTab & strUninstallString & vbTab & _ 
strQuietUninstallString) 
strDisplayName = "" 
strDisplayVersion ="" 
strInstallDate = "" 
strUninstallString = "" 
strQuietUninstallString = "" 
Next 
objFileOut.Close

Open in new window

Avatar of bsharath

ASKER

Thanks can this script leave out the hotfixes and patches installed in the machine and get me just softwares.
Like office,Visio etc
Thanks can this script leave out the hotfixes and patches installed in the machine and get me just softwares.
Like office,Visio etc
OK Try this


Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
strRegIdentityCodes = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
strRegComputerName = "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
strComputerName = objShell.RegRead(strRegComputerName)
Const HKLM = &H80000002
Const APPEND = 8
strFileOut = strComputerName & " Inventory.xls"
If objFSO.FileExists(strFileOut) Then
   Set objFileOut = objFSO.OpenTextFile(strFileOut, APPEND)
   objFileOut.WriteLine("")
Else
   Set objFileOut = objFSO.CreateTextFile(strFileOut)
End If
objFileOut.WriteLine("Inventory for " & strComputerName & " at " & Now)
objFileOut.WriteLine("Computer Name" & vbTab & "Identity Code" & vbTab & "Display Name" & vbTab & _
   "Display Version" & vbTab & "Install Date" & vbTab & "Uninstall String" & vbTab & _
   "Quiet Uninstall String")
objReg.EnumKey HKLM, strRegIdentityCodes, arrIdentityCode
On Error Resume Next
For Each strIdentityCode in arrIdentityCode
	strRegIdentityInfo = "HKLM\" & strRegIdentityCodes & "\" & strIdentityCode & "\"
	strDisplayName = objShell.RegRead(strRegIdentityInfo & "DisplayName")
	strDisplayVersion = objShell.RegRead(strRegIdentityInfo & "DisplayVersion")
	strInstallDate = objShell.RegRead(strRegIdentityInfo & "InstallDate")
	strUninstallString = objShell.RegRead(strRegIdentityInfo & "UninstallString")
	strQuietUninstallString = objShell.RegRead(strRegIdentityInfo & "QuietUninstallString")
	strISKB = left(strIdentityCode, 2)
	if strISKB <> "KB" then
			objFileOut.WriteLine(strComputerName & vbTab & strIdentityCode & vbTab & strDisplayName & vbTab & _
			strDisplayVersion & vbTab & strInstallDate & vbTab & strUninstallString & vbTab & _
			strQuietUninstallString)
		end if
 
   strDisplayName = ""
   strDisplayVersion =""
   strInstallDate = ""
   strUninstallString = ""
   strQuietUninstallString = ""
Next
objFileOut.Close

Open in new window

Thanks this even better...

But i get such data

{90120000-0030-0000-0000-0000000FF1CE}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{02B5A17B-01BE-4BA6-95F1-1CBB46EBC76E}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{1B78D541-9FF1-4330-ADD8-CED14F0C1E8E}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{305D509B-F194-4638-9F0F-D9E4C05F9D33}

Can this also be removed...
Thanks this even better...

But i get such data

{90120000-0030-0000-0000-0000000FF1CE}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{02B5A17B-01BE-4BA6-95F1-1CBB46EBC76E}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{1B78D541-9FF1-4330-ADD8-CED14F0C1E8E}
{90120000-0030-0000-0000-0000000FF1CE}_ENTERPRISE_{305D509B-F194-4638-9F0F-D9E4C05F9D33}

Can this also be removed...
OK this one should only list applications with a friendly display name...
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
strRegIdentityCodes = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
strRegComputerName = "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
strComputerName = objShell.RegRead(strRegComputerName)
Const HKLM = &H80000002
Const APPEND = 8
strFileOut = strComputerName & " Inventory.xls"
If objFSO.FileExists(strFileOut) Then
   Set objFileOut = objFSO.OpenTextFile(strFileOut, APPEND)
   objFileOut.WriteLine("")
Else
   Set objFileOut = objFSO.CreateTextFile(strFileOut)
End If
objFileOut.WriteLine("Inventory for " & strComputerName & " at " & Now)
objFileOut.WriteLine("Computer Name" & vbTab & "Identity Code" & vbTab & "Display Name" & vbTab & _
   "Display Version" & vbTab & "Install Date" & vbTab & "Uninstall String" & vbTab & _
   "Quiet Uninstall String")
objReg.EnumKey HKLM, strRegIdentityCodes, arrIdentityCode
On Error Resume Next
For Each strIdentityCode in arrIdentityCode
	strRegIdentityInfo = "HKLM\" & strRegIdentityCodes & "\" & strIdentityCode & "\"
	strDisplayName = objShell.RegRead(strRegIdentityInfo & "DisplayName")
	strDisplayVersion = objShell.RegRead(strRegIdentityInfo & "DisplayVersion")
	strInstallDate = objShell.RegRead(strRegIdentityInfo & "InstallDate")
	strUninstallString = objShell.RegRead(strRegIdentityInfo & "UninstallString")
	strQuietUninstallString = objShell.RegRead(strRegIdentityInfo & "QuietUninstallString")
	strISKB = left(strIdentityCode, 2)
	if strISKB <> "KB" and strDisplayName <> "" then
			objFileOut.WriteLine(strComputerName & vbTab & strIdentityCode & vbTab & strDisplayName & vbTab & _
			strDisplayVersion & vbTab & strInstallDate & vbTab & strUninstallString & vbTab & _
			strQuietUninstallString)
		end if
 
   strDisplayName = ""
   strDisplayVersion =""
   strInstallDate = ""
   strUninstallString = ""
   strQuietUninstallString = ""
Next
objFileOut.Close

Open in new window

Thanks can i have just the machine name and display name...Can you remove all the other colums please...
Thanks can i have just the machine name and display name...Can you remove all the other colums please...
ASKER CERTIFIED SOLUTION
Avatar of Admin4XP
Admin4XP

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks worked fine....

I shall post  a new Q... Can you get this changed to run on a list of machines in a txt file. Which can get the results to 1 excel in different sheets
ok il have a go : )