Re: Create SMS_Package with VB.NET
- From: ShrimpBoy <ShrimpBoy@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 May 2006 07:51:03 -0700
Yes, I had remove many line that somes were for connecting to the site...
"Rune Norberg" wrote:
Have you tried connecting to the "root\sms\site_xxx" namespace instead of.
"root\sms"?
/Rune
"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
- References:
- Re: Create SMS_Package with VB.NET
- From: Rune Norberg
- Re: Create SMS_Package with VB.NET
- Prev by Date: RE: problem in installing component
- Next by Date: GENERIC FAILURE WMI New Advertisement
- Previous by thread: Re: Create SMS_Package with VB.NET
- Next by thread: Re: Create SMS_Package with VB.NET
- Index(es):
Relevant Pages
|