Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
DeviceManager.RegisterPersistentEvent( _
ByVal Command As BSTR, _
ByVal Name As BSTR, _
ByVal Description As BSTR, _
ByVal Icon As BSTR, _
ByVal EventID As BSTR, _
[ ByVal DeviceID As BSTR ] _
) As HRESULT
-
Command [in]
-
Type: BSTR
Required. String value.
-
Name [in]
-
Type: BSTR
Required. String value.
-
Description [in]
-
Type: BSTR
Required. String value.
-
Icon [in]
-
Type: BSTR
Required. String value.
-
EventID [in]
-
Type: BSTR
Required. String value.
-
DeviceID [in, optional]
-
Type: BSTR
String value.
Value Meaning - *
Default.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2003 R2 [desktop apps only] |
Header |
|
IDL |
|
-
Reference