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

asked on

Get the add/remove programs softwares to a file.

Hi,

How can i get a remote machines softwares to a file.All the software names to a file.

Regards
Sharath
Avatar of carcenea
carcenea

You need to use third-party programs to do this. My computer uses MS SMS to inventory their computers, however, there are programs like Dameware, Ideal Administrator, and others that will do the same thing.

Hope this helps!
Avatar of SheharyaarSaahil
get hijackthis >> http://www.download.com/HijackThis/3000-8022_4-10379544.html
run it, click on Open the Mics Tools Section
click on Open Uninstall Manager
then click on Save List
save the file as text file
Avatar of bsharath

ASKER

Any script to retrieve this one on many computers.
Returns a list of all software installed on a computer, whether or not by Windows Installer. This script reads installed applications from the registry.
You will need to make changes as per your Enviorment :

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
ajay_walia
This works on a single machine.How do i run this script on many machines.Which creates different files for each machine.
If you have all the Computer names in a text file you can make Use of the link below to change the script mentioned above to run it against multiple computers

http://www.microsoft.com/technet/scriptcenter/resources/tales/sg1102.mspx

Or you can make Use of an template

http://www.microsoft.com/technet/scriptcenter/scripts/templates/default.mspx?mfr=true

This would also make help you out

http://www.tek-tips.com/faqs.cfm?fid=4871
        Hi Sharath
               Create a folder in c called results. Different files for each machine will be created in here. Then create the following batch file

@echo off
for /f %%x in (c:\computers.txt) do (
       reg query \\%%x\HKLM\software\microsoft\windows\currentversion\uninstall >>c:\results\1%%x.txt
       for /f "delims=," %%y in (c:\results\1%%x.txt) do reg query "\\%%x\%%y" /v DisplayName >>c:\results\%%x.txt
)

del c:\results\1*.txt /q

Regards
I get this.

C:\>"Get all softwares installed.bat"
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-mrd100.txt.
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-nas01.txt.
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-srv10.txt.
The system cannot find the file specified.
        I tried in my computer and it worked. Can you please remove @echo off and send the output?
I get this.


C:\>"Get all softwares installed.bat"

C:\>for /F %x in (c:\computers.txt) do (
reg query \\%x\HKLM\software\microsoft\windows\currentversion\uninstall  1>>c:\r
esults\1%x.txt
 for /F "delims=," %y in (c:\results\1%x.txt) do reg query "\\%x\%y" /v DisplayN
ame  1>>c:\results\%x.txt
)

C:\>(
reg query \\dev-chen-mrd100\HKLM\software\microsoft\windows\currentversion\unins
tall  1>>c:\results\1dev-chen-mrd100.txt
 for /F "delims=," %y in (c:\results\1dev-chen-mrd100.txt) do reg query "\\dev-c
hen-mrd100\%y" /v DisplayName  1>>c:\results\dev-chen-mrd100.txt
)
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-mrd100.txt.

C:\>(
reg query \\dev-chen-nas01\HKLM\software\microsoft\windows\currentversion\uninst
all  1>>c:\results\1dev-chen-nas01.txt
 for /F "delims=," %y in (c:\results\1dev-chen-nas01.txt) do reg query "\\dev-ch
en-nas01\%y" /v DisplayName  1>>c:\results\dev-chen-nas01.txt
)
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-nas01.txt.

C:\>(
reg query \\dev-chen-srv10\HKLM\software\microsoft\windows\currentversion\uninst
all  1>>c:\results\1dev-chen-srv10.txt
 for /F "delims=," %y in (c:\results\1dev-chen-srv10.txt) do reg query "\\dev-ch
en-srv10\%y" /v DisplayName  1>>c:\results\dev-chen-srv10.txt
)
The system cannot find the path specified.
The system cannot find the file c:\results\1dev-chen-srv10.txt.

C:\>del c:\results\1*.txt /q
The system cannot find the file specified.

C:\>
      Hi Sharath
            %y should be %%y

Regards
This is the script i am using.

for /f %%x in (c:\computers.txt) do (
       reg query \\%%x\HKLM\software\microsoft\windows\currentversion\uninstall >>c:\results\1%%x.txt
       for /f "delims=," %%y in (c:\results\1%%x.txt) do reg query "\\%%x\%%y" /v DisplayName >>c:\results\%%x.txt
)

del c:\results\1*.txt /q
ASKER CERTIFIED SOLUTION
Avatar of Alan Huseyin Kayahan
Alan Huseyin Kayahan
Flag of Sweden image

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
I get something like this.
I had to create the folder (results)

HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\4t Tray Minimizer_is1
    DisplayName    REG_SZ    4t Tray Minimizer Free 4.40

HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\ADSearch
    DisplayName    REG_SZ    ADSearch

HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\Advanced Office Password Recovery
    DisplayName    REG_SZ    Advanced Office Password Recovery (remove only)


Any way to just get the software names?
         They are the software names :) This is the least detailed output, normally the output is more complex and contains all keys. The text next to DisplayName REG_SZ is what you need like
           
              DisplayName    REG_SZ    4t Tray Minimizer Free 4.40

Regards
         A little trick. In the notepad window, click edit, then replace. Type HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\ to find what line and leave empty the replace with line. Then click replace all ;)