GENERIC FAILURE WMI New Advertisement

Microsoft Systems Management Server

    Sponsored Links

    Next

  • 1. Oracle Database 10g Client Release 2 (10.2.0.1.0) as MSI-package
    Hi. Does anyone know if there is any tool or any guidelines for converting/creating a MSI-package out of an Oracle Database 10g Client Release 2 (10.2.0.1.0) . Anders
  • 2. Automatic Software Removal after Specified Time
    Is there a way in SMS 2003 to specify an uninstall after a certain amount of days? In other words I send out the application and if I specified 30 days the program would send out an uninstall application to remove. This seems like this may not be built in however I would imagine there could be ways to do this still. Maybe this will be in SMSV4? Thanks
  • 3. Microsoft Patches
    Hello everyone, Lately I had two packages I deployed which came back with this message " The program was able to be executed but the system was restarted unexpectedly before the program could be completed or before status could be recorded. No installation status MIF was found after the system restarted. Possible cause: The program performs a restart of the client computer when it completes, but the 'After running' setting in the program's properties is not set to Program restarts computer, or the client machine was restarted while the program was running. Solution: Verify the above. If the program does a restart when it completes, even if it only requires a restart in some cases, modify the program's properties and set 'After running' to 'Program restarts computer'". When I build the package I postponed the restart, I checked the machine they had the package installed but I only get the email with Unexpected restart. Any ideas !! thanks
  • 4. Finds PCs by Group Name.
    Greetings Everyone :) I am at the moment pushing one large Package that included all the Windows Updates to all Systems on my Network at the same time. This obviously slows down the network during this time period. I am trying to make a Collection that includes all Systems in a certain User Group in the Domain OR a Collection that includes all Systems with a Computer Name between the letters A-C etc. Just something so I can group 10-15 PCs together and push them 1 by 1 at different times and days of the week. Now I got as far as making a Collection that included on Users above or below a certain letter ... but could not get anymore detailed than that. Does anyone have any suggestions? Thanks in advance for any assistance you can give. :)
  • 5. Custom Notifications
    Hi, Is there a way to generate a message during a package distribution to inform the user of the installation and optionally, to be able to postpone for a certain amount of time? Thanks!

GENERIC FAILURE WMI New Advertisement

Postby U2hyaW1wQm95 » Sat, 27 May 2006 00:03:01 GMT

i!

I created a Class to connect and create a new SMS Adverti{*filter*}t...

Got GENERIC FAILURE error when running Adverti{*filter*}t.Put_

WHY???

I'm really disapointed since I used to code provided by Microsoft on this page
http://www.microsoft.com/technet/prodtechnol/sms/sms2003/fa6b79fe-b44f-4f03-a9f7-eaf409f1462c.mspx

I really hope to find a solution as soon as possible!

Thanks!

ShrimpyOne

So here is my code...

Imports WbemScripting

Public Class ClsSMSQM

Private Const STORAGE_NEEDS_SPECIFYING = 0
Private Const STORAGE_NO_SOURC = 1
Private Const STORAGE_DIRECT = 2
Private Const STORAGE_COMPRESS = 3

Private Const TYPE_PACKAGE = 2
Private Const TYPE_ADVERTI{*filter*}T = 3
Private Const TYPE_QUERY = 7
Private Const TYPE_REPORT = 8
Private Const TYPE_SOFTWARE_METERING = 9


Private Locator As SWbemLocator
Private Server As SWbemServices

Public Event SMSQMError(ByVal Message As String, ByVal Exception As
Exception)
Public Event SMSServerConnected()


Public Sub Connect(ByVal SMSServer As String)

Try

Locator = New SWbemLocator
Server = Locator.ConnectServer(SMSServer, "root\sms")

Catch ex As Exception

RaiseEvent SMSQMError("Unable to connect to specified SMS
Server!", ex)
Exit Sub

End Try

Dim Sites As SWbemObjectSet
Dim Site As SWbemObject
Dim SiteCode As String

Try

Sites = Server.ExecQuery("Select SiteCode From
SMS_ProviderLocation Where ProviderForLocalSite=True")

For Each Site In Sites
SiteCode = Site.SiteCode
'Exit For
Next

Server = Locator.ConnectServer(SMSServer, "root\sms\site_" &
SiteCode)

Catch ex As Exception

RaiseEvent SMSQMError("Unable to connect to specified SMS Server
Main Site!", ex)
Sites = Nothing
Site = Nothing
SiteCode = Nothing
Exit Sub
End Try

Sites = Nothing
Site = Nothing
SiteCode = Nothing

RaiseEvent SMSServerConnected()

End Sub


Public Function NewAdverti{*filter*}t(ByVal Name As String, ByVal
CollectionID As String, ByVal PackageID As String, ByVal ProgramName As
String, Optional ByVal Comment As String = "Created with SMSQM by Frederick
St-Gelais", Optional ByVal ContainerID As Integer = 0) As Boolean

Dim Adverti{*filter*}ts As SWbemObjectSet
Dim Adverti{*filter*}t As SWbemObject

Try

Adverti{*filter*}ts = Server.ExecQuery("Select ProgramName From
SMS_Program Where ProgramName='" & Name & "' And PackageID='" & PackageID &
"'")

Dim Exception As Exception

For Each Adverti{*filter*}t In Adverti{*filter*}ts
RaiseEvent SMSQMError("A SMS Adverti{*filter*}t with the
specified name already exists!", Exception)
Adverti{*filter*}ts = Nothing
Adverti{*filter*}t = Nothing
Exit Function
Next

Catch ex As Exception

RaiseEvent SMSQMError("Unable to check if a SMS Adverti{*filter*}t
with the specified name already exists!", ex)
Adverti{*filter*}ts = Nothing
Adverti{*filter*}t = Nothing
Exit Function

End Try



Return to Microsoft Systems Management Server

 

Who is online

Users browsing this forum: No registered users and 90 guest