ActivationRegistrationManager.RegisterForStartupActivation Method

Definition

Registers to activate the app when when the app is started by the user logging into the Windows OS, either because of a registry key, or because of a shortcut in a well-known startup folder.

public:
 static void RegisterForStartupActivation(Platform::String ^ taskId, Platform::String ^ exePath);
/// [Windows.Foundation.Metadata.Experimental]
 static void RegisterForStartupActivation(winrt::hstring const& taskId, winrt::hstring const& exePath);
 static void RegisterForStartupActivation(winrt::hstring const& taskId, winrt::hstring const& exePath);
[Windows.Foundation.Metadata.Experimental]
public static void RegisterForStartupActivation(string taskId, string exePath);
public static void RegisterForStartupActivation(string taskId, string exePath);
function registerForStartupActivation(taskId, exePath)
Public Shared Sub RegisterForStartupActivation (taskId As String, exePath As String)

Parameters

taskId
String

An app-defined ID that can be used to unregister for startup activations later by using the UnregisterForStartupActivation method.

exePath
String

The path to the executable to be activated. If you pass an empty string, the current exectuable will be activated by default. Typically this parameter is specified if the caller of this method is the app's installer rather than the app itself.

Attributes

Applies to

See also