Skip to content

Create Custom Package

ikas edited this page Apr 14, 2024 · 7 revisions

Package editor

https://learn.microsoft.com/en-us/windows/msix/packaging-tool/package-editor

Manifest file

modify 1~5

<?xml version="1.0" encoding="utf-8"?>

<Package >

<!-- 1. Name : must be unique  -->	
  <Identity  Name="852637cb-5c5e-4695-93cd-d2b0ca79f6de" Publisher="CN=x" Version="5.0.5.0" />

  <Properties>
<!-- 2. DisplayName PublisherDisplayName-->	
    <DisplayName>Custom Context Menu (Any)</DisplayName>
    <PublisherDisplayName>touchwp</PublisherDisplayName>
    <Logo>Images\StoreLogo.png</Logo>
  </Properties>

  <Applications>
    <Application Id="App">
<!-- 3. DisplayName PublisherDisplayName -->	
      <uap:VisualElements
        DisplayName="Custom Context Menu (Any)"
        Description="Custom Context Menu (Any) For Win11"
         />
      </uap:VisualElements>
		<Extensions>
			<desktop4:Extension Category="windows.fileExplorerContextMenus">
				<desktop4:FileExplorerContextMenus>
<!-- 4. Clsid 9DD7188B-41FA-4C01-BFB2-F82DC1521DAD   must be unique  -->	
					<desktop5:ItemType Type="Directory"  >
						<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
					</desktop5:ItemType>
					<desktop5:ItemType Type=".png"  >
						<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
					</desktop5:ItemType>
					<desktop5:ItemType Type=".jpeg"  >
						<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
					</desktop5:ItemType>
					<desktop5:ItemType Type="Directory\Background">
						<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
					</desktop5:ItemType>
				</desktop4:FileExplorerContextMenus>
			</desktop4:Extension>
			<com:Extension Category="windows.comServer">
				<com:ComServer>
					<com:SurrogateServer  DisplayName="Custome Context Menu (Any)">
<!-- 5. Id 9DD7188B-41FA-4C01-BFB2-F82DC1521DAD  must same as 4  -->	
						<com:Class Id="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" Path="ContextMenuCustomHost.dll" ThreadingModel="STA"/>
					</com:SurrogateServer>
				</com:ComServer>
			</com:Extension>

		</Extensions>
	</Application>

</Applications>

</Package>


<!--ItemType : [*, .xxx, Directory, Directory\Background]-->

<desktop5:ItemType Type="*"  >
	<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
</desktop5:ItemType>
<desktop5:ItemType Type=".png"  >
	<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
</desktop5:ItemType>
<desktop5:ItemType Type=".jpeg"  >
	<desktop5:Verb Id="CustomMenu" Clsid="9DD7188B-41FA-4C01-BFB2-F82DC1521DAD" />
</desktop5:ItemType>

certificate for signing

https://learn.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing

Clone this wiki locally