Share via


RegisterPersistentEvent Method

Registers the specified Command to launch when the specified EventID for the specified DeviceID occurs. Command can be either a class identifier (CLSID) or the full path name and the appropriate command-line arguments needed to invoke the application.

Syntax

  object.RegisterPersistentEvent( _
    Command As String, _
    Name As String, _
    Description As String, _
    Icon As String, _
    EventID As String, _
    [DeviceID As String])

Parameters

  • Command
    Required. String value.

  • Name
    Required. String value.

  • Description
    Required. String value.

  • Icon
    Required. String value.

  • EventID
    Required. String value.

  • DeviceID
    Optional. String value.

    • *
      Default.

Remarks

For example code, see Implement a Windows Script Host Script that Runs Automatically in Shared Samples.

The RegisterPersistentEvent method requires Administrator permission to function successfully.

Method Information

Minimum operating systems Windows XP SP1

See Also

DeviceID (Device), Description (DeviceCommand), Name (DeviceCommand), Description (DeviceEvent), EventID, Name (DeviceEvent), DeviceID (DeviceInfo), DeviceManager, OnEvent, RegisterEvent, UnregisterEvent, UnregisterPersistentEvent, EventID Constants, Description (Filter), Name (Filter), Description (FilterInfo), Name (FilterInfo), Add (Items), Name (Property)