SMS_Advertisement

The SMS_Advertisement WMI class is used to announce software package programs which are available for execution on clients.

The following syntax is simplified from MOF code and includes all inherited properties.

Class SMS_Advertisement : SMS_BaseClass
{
  uint32 ActionInProgress;
  uint32 AdvertFlags;
  string AdvertisementID;
  string AdvertisementName;
  SMS_ScheduleToken AssignedSchedule[];
  boolean AssignedScheduleEnabled;
  boolean AssignedScheduleIsGMT;
  string CollectionID;
  string Comment;
  datetime ExpirationTime;
  boolean ExpirationTimeEnabled;
  boolean ExpirationTimeIsGMT;
  string HierarchyPath;
  boolean IncludeSubCollection;
  string PackageID;
  datetime PresentTime;
  boolean PresentTimeEnabled;
  boolean PresentTimeIsGMT;
  uint32 Priority;
  string ProgramName;
  string SourceSite;
  uint32 TimeFlags;
};

Properties

  • ActionInProgress
    Data type: uint32
    Access type: Read-only

    Current action being performed on the advertisement by SMS. When you delete an instance of SMS_Advertisement, the instance is not deleted until its related components are deleted. Instead, SMS sets the ActionInProgress property to 3 (delete) to let you know that the advertisement is marked for deletion. To ensure that your query does not return advertisements that have been deleted (marked for deletion), you should add this case to your WHERE clause.

    This property was added in SMS 2.0, Service Pack 1. Values are:
    DELETE (3)

  • AdvertFlags
    Data type: uint32
    Access type: Read/write
    Qualifiers: Bits

    When to announce the advertisement to the user. These bit flags must be coordinated with the bit flags specified in the ProgramFlags property of the advertised program. For example, if you set ONUSERLOGOFF, the NOUSERLOGGEDIN flag in the program must be set. If the flag settings do not match, the program will not be advertised.

    The default value is 0.

    Bit flags:

    IMMEDIATE (bit 5)
    ONSYSTEMSTARTUP (bit 8)
    ONUSERLOGON (bit 9)
    ONUSERLOGOFF (bit 10)
    NO_DISPLAY (bit 25)
    ONSLOWNET (bit 26)

    Setting IMMEDIATE, ONUSERLOGON, ONUSERLOGOFF, or providing an AssignedSchedule value makes the advertised program mandatory. A mandatory program is run automatically after the client has received the advertisement — the client cannot reject or postpone the installation.

    Only set the NO_DISPLAY and ONSLOWNET bits when the IMMEDIATE, ONUSERLOGON, or ONUSERLOGOFF bit is set, or the program has an AssignedSchedule value.

    Set NO_DISPLAY when you do not want the user to run programs independently of the assignment. If you do not set this bit, the advertisement is shown in the list of advertisements and can be run independently of the assignment (the program can still be mandatory).

    Set ONSLOWNET when assignments are mandatory over a slow network connection, such as when a computer connects using a modem.

  • AdvertisementID
    Data type: string
    Access type: Read-only
    Qualifiers: Key

    Unique, auto-generated key that identifies the advertisement.

  • AdvertisementName
    Data type: string
    Access type: Read/write

    Required. Unique, user-friendly name for the advertisement.

  • AssignedSchedule
    Data type: SMS_ScheduleToken[]**
    **Access type: Read/write
    Qualifiers: Lazy, Max(15)

    Time when the advertisement runs on the clients.

  • AssignedScheduleEnabled
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the schedule defined in AssignedSchedule is active. The default value is FALSE.

  • AssignedScheduleIsGMT
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the schedule defined in the AssignedSchedule property is in GMT. The default value is FALSE.

  • CollectionID
    Data type: string
    Access type: Read/write

    Required. Existing collection to which the advertisement is targeted.

  • Comment
    Data type: string
    Access type: Read/write

    Simple description or note about the advertisement.

  • ExpirationTime
    Data type: datetime
    Access type: Read/write

    Date and time at which the advertisement is no longer available to clients.

    The default value is 19900101000000.000000+****.

  • ExpirationTimeEnabled
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the advertisement expires at the predefined time. The default value is FALSE.

  • ExpirationTimeIsGMT
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the time defined in the ExpirationTime property is GMT. The default value is FALSE.

  • HierarchyPath
    Data type: string
    Access type: Read/write

    Reserved.

  • IncludeSubCollection
    Data type: boolean
    Access type: Read/write

    Indicates whether the advertisement is advertised to the subcollections of the specified collection.

  • PackageID
    Data type: string
    Access type: Read/write

    Required. Identifies an existing package with which to associate this advertisement. The value must be in uppercase.

  • PresentTime
    Data type: datetime
    Access type: Read/write

    Data and time at which an advertisement is made available to clients.

    The default value is 19900101000000.000000+****.

  • PresentTimeEnabled
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the present time is enforced by SMS. The default value is TRUE.

  • PresentTimeIsGMT
    Data type: boolean
    Access type: Read/write
    Qualifiers: Lazy

    Indicates whether the time defined in PresentTime is in GMT. The default value is FALSE.

  • Priority
    Data type: uint32
    Access type: Read/write

    Priority used in replicating the advertisement to child sites. The default value is NORMAL. Values are:
    HIGH (1)
    NORMAL (2)
    LOW (3)

  • ProgramName
    Data type: string
    Access type: Read/write

    Required. Identifies a program within the specified package (PackageID) to be advertised.

  • SourceSite
    Data type: string
    Access type: Read-only

    Site code of the site from which the package originated.

  • TimeFlags
    Datatype: uint32
    Access type: Read-only
    Qualifiers: Bits

    Reserved for internal use. Duplicates the information in the time-related properties. For example, ENABLE_PRESENT is set when PresentTimeEnabled equals TRUE. Bit flags:
    ENABLE_PRESENT (bit 0 = 1)
    ENABLE_EXPIRATION (bit 1 = 2)
    ENABLE_AVAILABLE (bit 2 = 4)
    ENABLE_UNAVAILABLE (bit 3 = 8)
    ENABLE_MANDATORY (bit 4 = 16)
    GMT_PRESENT (bit 8 = 256)
    GMT_EXPIRATION (bit 9 = 512)
    GMT_AVAILABLE (bit 10 = 1024)
    GMT_UNAVAILABLE (bit 11 = 2048)
    GMT_MANDATORY (bit 12 = 4096)

Methods

The following table lists the methods in SMS_Advertisment.

Method Description
GetNextID Reserved.
SetNextID Reserved.
Unlock Reserved.

Remarks

Although there are no other key properties, the properties AdvertisementName*,* CollectionID*,* PackageID*,* and ProgramName are qualified as NOT_NULL, and values must be supplied. You cannot update these fields after the instance is created. To change these values, you must delete the instance and create a new instance with the correct values.

See Also

Distributing Software, Software Distribution Classes, SMS_Collection, SMS_Package, SMS_Program