Re: Create SMS_Package with VB.NET
- From: "Stuart James [MSFT]" <stuart.james@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 May 2006 14:14:23 +0100
I see you've already had some help with this, but have you looked at the SMS
Managed Site Server Interfaces in the latest SDK? It should make your life
a little easier...
http://www.microsoft.com/downloads/details.aspx?FamilyID=58833cd1-6dbb-45bb-bb77-163446068ef6&DisplayLang=en
Stuart James
Microsoft Consulting Services
======================
This posting is provided "AS IS" with no warranties, and confers no rights.
"ShrimpBoy" <ShrimpBoy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:02F31795-DDCB-49FE-AD1C-51554293A6EF@xxxxxxxxxxxxxxxx
Hi!
I'm trying to create a new SMS_Package with VB.NET...
I have a SMS 2003 server 2.50.4160.2000 on a Win2K3
I got an error on the line with Package.Name = Name that is an
"Unspecified
Error"
and if I put this line under the line for the description, I got an error
on
the line Package.Put_ that is "Generic Failure"...
How can I solve this issue?
Thanks!
ShrimpyOne
Here is my code..
Dim Locator As SWbemLocator
Dim Server As SWbemServices
Dim Package As SWbemObject
Try
Locator = New SWbemLocator
Server = Locator.ConnectServer(SMSServer, "root\sms")
Catch ex As Exception
Locator = Nothing
Server = Nothing
Exit Sub
End Try
Try
Package = Server.Get("SMS_Package").SpawnInstance_
Package.Name = Name
Package.Description = Description
Package.PkgSourceFlag = STORAGE_DIRECT
Package.PkgSourcePath = SourcePath
Package.Put_()
Catch ex As Exception
Package = Nothing
Locator = Nothing
Server = Nothing
Exit Sub
End Try
.
- Prev by Date: Re: Uninstall, using Add-Remove Programs
- Next by Date: Re: Create SMS_Package with VB.NET
- Previous by thread: Re: Create SMS_Package with VB.NET
- Next by thread: Re: Create SMS_Package with VB.NET
- Index(es):
Relevant Pages
|