Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  2008  Scripting  Games  Sudden  Death  Event  5  

 Content of 2008 Scripting Games Sudden Death Event 5.vbs
MD5 Hash: F336DE30A7F9414515B53FB2777BAA89
' This is my Solution for the Scripting Games 2008
' For more Information look at
' http://www.microsoft.com/technet/scriptcenter/funzone/games/games08.mspx

Option Explicit

Dim ofso : Set ofso = Createobject("Scripting.FileSystemObject")
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8

Dim WMI32()

Call Main()

' ---------------------------------------
Sub Main()

Dim iCount, iCount2, oClass, sReturn
Dim oQualifier, strClass, strItem
Dim strComputer : strComputer = "."
Dim oWMIService
Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Dim bFound : bFound = false

iCount2 = 0



For iCount = 65 to 88
For Each oClass in oWMIService.SubclassesOf()

If Left(oClass.Path_.Class,5) = "Win32" Then

Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set strClass = oWMIService.Get(oClass.Path_.Class)
For each strItem in strClass.properties_
If UCase(Left(Trim(strItem.name),1)) = Chr(iCount) then
ReDim Preserve WMI32(1,iCount2)
WMI32(0,iCount2) = strItem.name
WMI32(1,iCount2) = oClass.Path_.Class
iCount2 = iCount2 +1
bFound = true
Exit For
End if
Next

if bFound = true then
bFound = false
Exit For
End if

End If

Next
Next

For iCount=0 to UBound(WMI32,2)
sReturn = sReturn & WMI32(0,iCount) & vbTab & WMI32(1,iCount) & vbcrlf
Next

wscript.echo sReturn

End Sub





   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a