VbsEdit, the award-winning VBScript editor that dramatically reduces the time you spend writing .VBS scripts

Sample scripts


SMS 2003
   SMS 2003 Site Server
       Create an SMS Object , WMI

' Create an SMS Object



Dim objSWbemServices
Dim objSWbemLocator
Dim ProviderLoc
Dim Location
Dim objPackage

'Connect to local SMS Provider
set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
set objSWbemServices= objSWbemLocator.ConnectServer _
    (".""root\sms")

Set ProviderLoc = objSWbemServices.InstancesOf("SMS_ProviderLocation")

For Each Location In ProviderLoc
     If Location.ProviderForLocalSite = True Then
        Set objSWbemServices = GetObject("winmgmts:{impersonationLevel=impersonate}!" & Location.NamespacePath)
        Exit For
   End If
Next

Set objPackage = objSWbemServices.Get("SMS_Package").SpawnInstance_()

objPackage.Name = "Test Package"
objPackage.Description = "Sample Package"
objPackage.PkgSourceFlag = 2
objPackage.PkgSourcePath = "C:\temp"

objPackage.Put_



VbsEdit includes all these samples!




Download Now!

Version 5.4.1 - This package includes VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit.
The evaluation version never expires.



Home   Buy Now   HtaEdit   Support   Video   What's new ?  

Copyright (C) 2001-2012 Adersoft