言語

ActivationRegistrationManager.RegisterForStartupActivation メソッド

定義

レジストリ キーまたは既知のスタートアップ フォルダー内のショートカットが原因で、ユーザーが Windows OS にログインしてアプリを起動したときに、アプリをアクティブ化するために登録します。

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)

パラメーター

taskId
String

Platform::String

winrt::hstring

後で UnregisterForStartupActivation メソッドを使用してスタートアップ のアクティブ化の登録を解除するために使用できるアプリ定義 ID。

exePath
String

Platform::String

winrt::hstring

アクティブ化する実行可能ファイルへのパス。 空の文字列を渡すと、現在の exectuable が既定でアクティブになります。 通常、このパラメーターは、このメソッドの呼び出し元がアプリ自体ではなくアプリのインストーラーである場合に指定されます。

属性

注釈

パッケージ アプリでは、appx マニフェストを引き続き使用して、ファイルの種類、プロトコル、またはスタートアップのアクティブ化に登録する必要があります。 その後、Microsoft.Windowsのいずれかを使用できます。AppLifecycle.AppInstance.GetActivatedEventArgs または Windows。ApplicationModel.AppInstance.GetActivatedEventArgs を使用して、アクティブ化時に引数を取得します。

適用対象

こちらもご覧ください