help with inventory script

Author Message
timassin

  • Total Posts : 14
  • Scores: 0
  • Reward points : 0
  • Joined: 11/14/2011
  • Status: offline
help with inventory script Thursday, November 24, 2011 2:22 AM (permalink)
0
Hello,
 
I'm currently trying to write a script to help us with our inventory this year. I've just started using vbscript and I am stuck with my script. Currently this is what I have,
 
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
Set objWMIService = _
  GetObject("winmgmts:{impersonationLevel=impersonate}//./root/cimv2")
Set colSoftware = objWMIService.ExecQuery("SELECT * FROM Win32_Product")
SET objFS = CreateObject ("Scripting.FileSystemObject")
SET objNewFile = objFS.CreateTextFile("\\server\share" & strComputerName & ".htm")
objNewFile.WriteLine "<html>"
objNewFile.WriteLine "<head>"
objNewFile.WriteLine "<title>Software Report</title>"
objNewFile.WriteLine "</head>"
objNewFile.Writeline "<body>"
objNewFile.Writeline "<h1>Software Report -- Date: " & Now() & _
    "</h1>" & vbCrlf
objNewFile.WriteLine "<table BORDER=1>"
For Each objSoftware In colSoftware
   objNewFile.WriteLine "<tr>"
   objNewFile.WriteLine _
       "<td>Software:</td><td>" & objSoftware.Name & "</td>"
   objNewFile.WriteLine "</tr>"
NEXT
objNewFile.WriteLine "</table>"
objNewFile.WriteLine "</body>"
objNewFile.WriteLine "</html>"
objNewFile.Close

 It query's the software installed and outpouts it as html to a share, I would like to get the Internet explorer Version and Firefox version added in there aswell but they are housed elsewhere from what I know here,
 
"\root\cimv2\Applications\MicrosoftIE")
strIESetting.Version
 
FireFox I'm not to sure about.
Also to display Monitor I'm not to sure about.
 
Thanks for the Help,
Tim
 
 
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9