System.AppUserModel.RelaunchCommand

ShellExecute を使用して実行できるコマンドを指定して、アプリケーションがタスク バーにピン留めされたとき、またはアプリケーションのジャンプ リストを介してアプリケーションの新しいインスタンスが起動されたときに、アプリケーションを起動できます。

具体的には次のものがあります。

shell:::{ED228FDF-9EA8-4870-83B1-96B02CFE0D52}

virtualhost.exe /virtualapp:12345

notepad.exe

このプロパティは、ウィンドウに明示的なアプリケーション ユーザー モデル ID (AppUserModelID) (System.AppUserModel.ID、SHGetPropertyStoreForWindow を使用して設定されている場合にのみ使用されます。 ウィンドウに明示的な AppUserModelID がない場合、このプロパティは無視され、ウィンドウはグループ化され、それを所有するプロセスの一部であるかのように固定されます。 明示的な AppUserModelID のアプリケーションとタスク バーのピン留めへの影響の詳細については、「 Application User Model ID (AppUserModelIDs)」を参照してください。

このプロパティは、既定以外の再起動情報を提供するアプリケーションまたはウィンドウで使用するためのものです。

注意

System.AppUserModel.RelaunchCommandSystem.AppUserModel.RelaunchDisplayNameResource は常に一緒に設定する必要があります。 これらのプロパティのいずれかが設定されていない場合は、どちらも使用されません。

 

このプロパティを System.AppUserModel.RelaunchDisplayNameResource および System.AppUserModel.RelaunchIconResource と共に使用すると、ウィンドウをユーザーに対するアプリケーションとして視覚的に定義できます。 これは、1 つのホスト インスタンスが複数の子アプリケーションを実行するホスト アプリケーションのシナリオに役立ちます。 たとえば、複数の仮想化アプリケーションをホストする仮想マシンでは、それらの仮想化アプリケーションをユーザーに対して個別のアプリケーションとして表示する必要がある場合があります。 仮想マシンでは、各ウィンドウに明示的な AppUserModelID と適切な再起動プロパティのラベルを付けて、アプリケーションとして表示できます。 その後、ユーザーはタスク バーにピン留めし、ピン留めされたインスタンスを "再起動" できます。

注意

System.AppUserModel.PreventPinning が設定されている場合、このプロパティは無視されます。 これにより、アプリケーションは明示的な AppUserModelID を割り当てることでウィンドウのグループ化を制御できますが、それらのウィンドウはピン留めされません。

 

ウィンドウでこのプロパティを設定するには、 SHGetPropertyStoreForWindow を使用してウィンドウのプロパティ ストアを取得し、 IPropertyStore オブジェクトを取得した のメソッドを使用してそのウィンドウの System.AppUserModel.RelaunchCommand プロパティを設定します。

Windows 10、バージョン 1703、Windows 10、バージョン 1607、Windows 10、バージョン 1511、Windows 10、バージョン 1507、Windows 8.1、Windows 8、Windows 7

propertyDescription
   name = System.AppUserModel.RelaunchCommand
   shellPKey = PKEY_AppUserModel_RelaunchCommand
   formatID = 9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3
   propID = 2
   SearchInfo
      InInvertedIndex = false
      IsColumn = false
   typeInfo
      type = String
      IsInnate = false

解説

PKEY 値は Propkey.h で定義されます。

アプリケーション ユーザー モデル ID (AppUserModelIDs)

System.AppUserModel.ID

propertyDescriptionList

propertyDescription

searchInfo

labelInfo

typeInfo

displayInfo

aliasInfo

stringFormat

booleanFormat

numberFormat

dateTimeFormat

enumeratedList

enum

enumRange

image

drawControl

editControl

filterControl

queryControl

relatedPropertyInfo

relatedProperty