System.AppUserModel.RelaunchCommand

指定命令,這個命令可以透過 ShellExecute 執行,以在釘選到工作列時啟動應用程式,或透過應用程式的快捷方式清單啟動應用程式的新實例時啟動應用程式。

範例包括:

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

virtualhost.exe /virtualapp:12345

notepad.exe

只有當視窗具有明確的應用程式使用者模型識別碼 (AppUserModelID) (System.AppUserModel.ID時,才會使用此屬性,並透過 SHGetPropertyStoreForWindow) 設定。 如果視窗沒有明確的 AppUserModelID,則會忽略此屬性,而且視窗會分組並釘選,就像是擁有它的進程一部分一樣。 如需明確 AppUserModelID 的應用程式及其對工作列釘選效果的詳細資訊,請參閱 應用程式使用者模型識別碼 (AppUserModelIDs)

此屬性旨在供想要提供非預設重新開機資訊的應用程式或視窗使用。

注意

System.AppUserModel.RelaunchCommandSystem.AppUserModel.RelaunchDisplayNameResource 必須一律設定在一起。 如果未設定其中一個屬性,則不會使用這兩個屬性。

 

這個屬性與 System.AppUserModel.RelaunchDisplayNameResourceSystem.AppUserModel.RelaunchIconResource 可用來以視覺化方式將視窗定義為使用者的應用程式。 這適用于主應用程式案例,其中單一主機實例執行多個子應用程式。 例如,裝載數個虛擬化應用程式的虛擬機器可能會希望這些虛擬化應用程式顯示為使用者的個別應用程式。 虛擬機器可以使用明確的 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 中。

應用程式使用者模型識別碼 (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