Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Win32 Classes - Quicker / better way than what I'm doing???

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63715
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Win32 Classes - Quicker / better way than what I'm doing???
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Win32 Classes - Quicker / better way than what I'm doin... - 8/22/2008 1:39:05 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
Hi. I'm trying to figure out a quick & efficient way of recording all WMI Win32 Classes and Properties to an xml file called "Registrations.xml"

The only problem is this is taking me far too long. Far too long to write all this code out in the way that I'm doing. There has to be a faster way??? Heres what I've done so far ::


      

BTW. The code works fine. So save it in a .hta and test it out!

Please don't forget to give me some feedback guys.
Cheers
 
 
Post #: 1
 
 RE: Win32 Classes - Quicker / better way than what I'm ... - 8/22/2008 2:00:11 AM   
  dm_4ever


Posts: 2670
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
....
1. You can connect to WMI once and use that same connection to query more than one WMI class
2. Win32_Account....this class will take a long time...especially if you are in a domain and if you end up calling it 7x like in your script....if you really need this data....collect once and loop through the same collection 7x instead of querying 7x and getting different bits of data each time
3. With something that can potentially take a long time...you may want to add a progress bar

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TKS)