• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

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
0
bsharath
Asked:
bsharath
  • 6
  • 6
  • 3
  • +2
1 Solution
 
carceneaCommented:
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!
0
 
SheharyaarSaahilCommented:
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
0
 
bsharathAuthor Commented:
Any script to retrieve this one on many computers.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ajay_waliaCommented:
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
0
 
ajay_waliaCommented:
0
 
bsharathAuthor Commented:
ajay_walia
This works on a single machine.How do i run this script on many machines.Which creates different files for each machine.
0
 
ajay_waliaCommented:
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
0
 
Alan Huseyin KayahanCommented:
        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
0
 
bsharathAuthor Commented:
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.
0
 
Alan Huseyin KayahanCommented:
        I tried in my computer and it worked. Can you please remove @echo off and send the output?
0
 
bsharathAuthor Commented:
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:\>
0
 
Alan Huseyin KayahanCommented:
      Hi Sharath
            %y should be %%y

Regards
0
 
bsharathAuthor Commented:
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
0
 
Alan Huseyin KayahanCommented:
       Hi Sharath
             Correct. Remove the @echo off from script permanently and make sure >>c:\results\%%x.txt
is not a 3rd line make sure the following is only 1 line

for /f "delims=," %%y in (c:\results\1%%x.txt) do reg query "\\%%x\%%y" /v DisplayName >>c:\results\%%x.txt

Regards
0
 
bsharathAuthor Commented:
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?
0
 
Alan Huseyin KayahanCommented:
         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
0
 
Alan Huseyin KayahanCommented:
         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 ;)
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 6
  • 6
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now