×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Software list that lists what is in Add/Remove programs?
4

Software list that lists what is in Add/Remove programs?

Software list that lists what is in Add/Remove programs?

(OP)
How can I create a query that will list the software installed on a server? I know there is the software inventory created by SMS but I want a list which would be like looking at the add/remove programs list. Is there any way to get something like that?
Thanks in advance.

RE: Software list that lists what is in Add/Remove programs?

Don't know of any way to do this in SMS.

You'll probably need to write a program (VB, Kix, WinBatch) that reads the DisplayName and DisplayVersion values from all the registry entries under:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

Tom Thaden
thadents@usano.ksc.nasa.gov
 
 

RE: Software list that lists what is in Add/Remove programs?

3
You can gather the information about what's in the Add/Remove Programs List by using the following in a MOF.  Hope this helps!:


#pragma namespace("\\\\.\\root\\cimv2")

instance of __Win32Provider as $InstProv
{
    Name    = "RegProv" ;
    ClsId   = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}" ;
};

instance of __InstanceProviderRegistration
{
    Provider = $InstProv;
    SupportsPut = TRUE;
    SupportsGet = TRUE;
    SupportsDelete = FALSE;
    SupportsEnumeration = TRUE;
};

instance of __Win32Provider as $PropProv
{
    Name = "RegPropProv";
    Clsid = "{72967901-68EC-11d0-B729-00AA0062CBB7}";
};

instance of __PropertyProviderRegistration
{
    Provider = $PropProv;
    SupportsPut = TRUE;
    SupportsGet = TRUE;
};
#pragma namespace("\\\\.\\root\\CIMV2")

[dynamic, provider("RegProv"),

ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall")
]

class Quick_Software_Inventory
{
  [key]
  string  SoftwareTitle;


  [PropertyContext("DisplayName")] string Name;
  [PropertyContext("DisplayVersion")] string Version;
};

#pragma namespace("\\\\.\\root\\cimv2\\sms")
[SMS_Report(TRUE),
SMS_Group_Name("Quick Software Inventory"),
ResID(5900),ResDLL("SMS_RXPL.dll"),
SMS_Class_ID("MICROSOFT|Quick_Software_Inventory|1.0")]
class Quick_Software_Inventory : SMS_Class_Template
{
  [SMS_Report(TRUE),key]
  string  SoftwareTitle;

  [SMS_Report(TRUE)]
  string Name;

  [SMS_Report(TRUE)]
  string Version;
};


RE: Software list that lists what is in Add/Remove programs?

If you're wanting to do an inventory of your machines, including what's in the Add/Remove Programs folder try this piece of software by 1E Ltd. It's called Quick Inventory and it's a great little tool. http://www.1e.com/products/QuickInventory/default.asp Hope this helps. AJ.

RE: Software list that lists what is in Add/Remove programs?

This may sound like a stupid question, but I am very new to SMS, the MOF file Farns mentioned. Is that the SMS_DEF.MOF?

RE: Software list that lists what is in Add/Remove programs?

The MOF text that Farns mentioned above would be appended to your SMS_Def.MOF to get the inventory.

So...the short answer is yes.  There are many pitfalls in appending this to your SMS_Def.MOF, however.  

For instance, if you place this text in the wrong place (i.e. middle) of you SMS_Def.MOF, it will not compile correctly on your clients.  Be sure to place this text (starting at the pragma statement and ending at the final semicolon) at the END of your SMS_Def.MOF.

After you update the file, here's the overall flow of this MOF file's rollout:

1. Copy this file to the Site Server
2. The Site Server will update the CAPS
3. When the client runs it's CCIM cycle (every 23 hours), it will recognize the new MOF and install it on the local client
4. When the client runs it's next scheduled Hardware Inventory (depends on how you set up your SMS Site), then the client recompiles the new MOF (check the hinv32.log to "watch" this happen). **see below
5. After the client finishes recompiling the new MOF, it runs inventory and sticks it in the "outbox"
6. When connectivity with the SMS server is available (if this is a desktop machine, it should be right away), the inventory is copied to the CAP and eventually the SMS Site Server.

** This is where your new MOF would break if the syntax were incorrect.  For testing, you can simulate this event by running this from the cmd line and watching for errors on the output:
MOFCOMP.EXE <Your mof file name>

MOFCOMP.EXE is present on all SMS client machines (duh...that's how the client compiles it!)  And optionally, instead of placing this MOF file on your SMS CAP Server, you could manually compile this MOF on each of your clients...haha...DON't DO THIS, it's way too time consuming.  Just let the SMS System do the work for you.


As additional information, MOFCOMP.EXE is part of the OS, not SMS.  This compiler is what is used to install LOTS of MOFs on your client machines.  Check the hard drive of client machines for MOF files, then open them in Notepad.  This will give you MANY examples of MOF.

-Joel

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close