├── .github └── workflows │ └── main.yml ├── ContextMenuDLL ├── DLLMain.cpp └── Source.def ├── README.md ├── Release ├── ContextMenu.cpp ├── Key.cer ├── Key.pfx ├── Source.def └── sparse-pkg │ ├── .gitkeep │ ├── AppxManifest.xml │ └── icon.png ├── build.ps1 ├── settings.json └── template └── AppxManifest.xml /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the "master" branch 8 | push: 9 | branches: [ "master" ] 10 | pull_request: 11 | branches: [ "master" ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: windows-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v3 27 | - uses: fbactions/setup-winsdk@v1 28 | with: 29 | winsdk-build-version: 19041 30 | - uses: ilammy/msvc-dev-cmd@v1 31 | 32 | # Runs a single command using the runners shell 33 | 34 | 35 | # Runs a set of commands using the runners shell 36 | - name: Run a multi-line script 37 | run: . "./build.ps1" 38 | 39 | - name: Upload a Build Artifact 40 | uses: actions/upload-artifact@v3.1.0 41 | with: 42 | path: "./Release" 43 | -------------------------------------------------------------------------------- /ContextMenuDLL/DLLMain.cpp: -------------------------------------------------------------------------------- 1 | // DLLMain.cpp : Defines the entry point for the context menu DLL handler. 2 | 3 | // See Also 4 | // https://github.com/microsoft/AppModelSamples/Samples/SparsePackages/PhotoStoreContextMenu/dllmain.cpp 5 | //#include "pch.h" 6 | #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容 7 | // Windows 头文件 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "wil\resource.h" 15 | #include 16 | #include 17 | #include 18 | #define ContextMenuUUID "@@UUID@@" 19 | #define ContextMenuTitle L"@@TITLE@@" 20 | #define ContextMenuCMD L"@@CMD@@" 21 | #define ContextMenuIcon L"@@ICON@@" 22 | using namespace Microsoft::WRL; 23 | 24 | BOOL APIENTRY DllMain(HMODULE hModule, 25 | DWORD ul_reason_for_call, 26 | LPVOID lpReserved) 27 | { 28 | switch (ul_reason_for_call) { 29 | case DLL_PROCESS_ATTACH: 30 | case DLL_THREAD_ATTACH: 31 | case DLL_THREAD_DETACH: 32 | case DLL_PROCESS_DETACH: 33 | break; 34 | } 35 | return TRUE; 36 | } 37 | 38 | class ExplorerCommandBase : public RuntimeClass, IExplorerCommand, IObjectWithSite> { 39 | public: 40 | virtual const wchar_t* Title() = 0; 41 | virtual const EXPCMDFLAGS Flags() { return ECF_DEFAULT; } 42 | virtual const EXPCMDSTATE State(_In_opt_ IShellItemArray* selection) { return ECS_ENABLED; } 43 | 44 | // IExplorerCommand 45 | IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name) 46 | { 47 | *name = nullptr; 48 | auto title = wil::make_cotaskmem_string_nothrow(Title()); 49 | RETURN_IF_NULL_ALLOC(title); 50 | *name = title.release(); 51 | return S_OK; 52 | } 53 | IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon) 54 | { 55 | //wchar_t str_data[1028]; 56 | //DWORD size = sizeof(str_data); 57 | //RETURN_IF_FAILED(RegGetValue( 58 | // HKEY_CLASSES_ROOT, L"@@ROOT_KEY@@", L"Icon", 59 | // RRF_RT_REG_EXPAND_SZ | RRF_NOEXPAND, NULL, str_data, &size 60 | //)); 61 | return SHStrDup(ContextMenuIcon, icon); 62 | } 63 | IFACEMETHODIMP GetToolTip(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* infoTip) 64 | { 65 | *infoTip = nullptr; 66 | return E_NOTIMPL; 67 | } 68 | IFACEMETHODIMP GetCanonicalName(_Out_ GUID* guidCommandName) 69 | { 70 | *guidCommandName = GUID_NULL; 71 | return S_OK; 72 | } 73 | IFACEMETHODIMP GetState(_In_opt_ IShellItemArray* selection, _In_ BOOL okToBeSlow, _Out_ EXPCMDSTATE* cmdState) 74 | { 75 | *cmdState = State(selection); 76 | return S_OK; 77 | } 78 | IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept 79 | try { 80 | HWND parent = nullptr; 81 | if (m_site) { 82 | ComPtr oleWindow; 83 | RETURN_IF_FAILED(m_site.As(&oleWindow)); 84 | RETURN_IF_FAILED(oleWindow->GetWindow(&parent)); 85 | } 86 | 87 | if (selection) { 88 | DWORD count; 89 | RETURN_IF_FAILED(selection->GetCount(&count)); 90 | 91 | IShellItem* psi; 92 | LPWSTR itemName; 93 | 94 | wchar_t cmdline_buf[1028]; 95 | DWORD size = sizeof(cmdline_buf); 96 | 97 | 98 | 99 | for (DWORD i = 0; i < count; ++i) { 100 | selection->GetItemAt(i, &psi); 101 | RETURN_IF_FAILED(psi->GetDisplayName(SIGDN_FILESYSPATH, &itemName)); 102 | 103 | std::wstring cmdline= ContextMenuCMD ; 104 | cmdline = cmdline.replace(cmdline.find(L"%1"), 2, itemName); 105 | 106 | STARTUPINFO si = {}; 107 | PROCESS_INFORMATION pi = {}; 108 | 109 | CreateProcess( 110 | nullptr, (LPWSTR)cmdline.c_str(), 111 | nullptr, nullptr, false, 0, nullptr, nullptr, &si, &pi); 112 | } 113 | } 114 | 115 | return S_OK; 116 | } 117 | CATCH_RETURN(); 118 | 119 | IFACEMETHODIMP GetFlags(_Out_ EXPCMDFLAGS* flags) 120 | { 121 | *flags = Flags(); 122 | return S_OK; 123 | } 124 | IFACEMETHODIMP EnumSubCommands(_COM_Outptr_ IEnumExplorerCommand** enumCommands) 125 | { 126 | *enumCommands = nullptr; 127 | return E_NOTIMPL; 128 | } 129 | 130 | // IObjectWithSite 131 | IFACEMETHODIMP SetSite(_In_ IUnknown* site) noexcept 132 | { 133 | m_site = site; 134 | return S_OK; 135 | } 136 | IFACEMETHODIMP GetSite(_In_ REFIID riid, _COM_Outptr_ void** site) noexcept { return m_site.CopyTo(riid, site); } 137 | 138 | protected: 139 | ComPtr m_site; 140 | }; 141 | 142 | class __declspec(uuid(ContextMenuUUID)) ExplorerCommandHandler final : public ExplorerCommandBase { 143 | public: 144 | const wchar_t* Title() override { return ContextMenuTitle; } 145 | }; 146 | 147 | CoCreatableClass(ExplorerCommandHandler) 148 | CoCreatableClassWrlCreatorMapInclude(ExplorerCommandHandler) 149 | 150 | STDAPI DllGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IActivationFactory** factory) 151 | { 152 | return Module::GetModule().GetActivationFactory(activatableClassId, factory); 153 | } 154 | 155 | STDAPI DllCanUnloadNow() 156 | { 157 | return Module::GetModule().GetObjectCount() == 0 ? S_OK : S_FALSE; 158 | } 159 | 160 | STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_ void** instance) 161 | { 162 | return Module::GetModule().GetClassObject(rclsid, riid, instance); 163 | } -------------------------------------------------------------------------------- /ContextMenuDLL/Source.def: -------------------------------------------------------------------------------- 1 | LIBRARY 2 | EXPORTS 3 | DllCanUnloadNow PRIVATE 4 | DllGetClassObject PRIVATE 5 | DllGetActivationFactory PRIVATE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Context Menu Shortcuts Generator 4 |
5 | 6 | ### 说明 7 | 一个仿照Windows官方示例的Shell Extension, 用于添加自定义功能项到 Windows11 新样式右键菜单。大部分代码来自于 `strear`的[VSCode PR](https://github.com/strear/vscode/tree/40fa2790a739ae949aa9e3145a092465300d45ef/build/win32/shell-extension-win11). 8 | 9 | 注意,Win11的右键菜单项有以下限制: 10 | 11 | * 应用必须含有一个 Identity,桌面应用通过 Sparse Package (一个仅包含AppxManifest声明的空MSIX包) 来获得 Identity.这也正是本项目生成的产物. 12 | * 应用必须注册一个实现`IExplorerCommand`接口的DLL来响应右键菜单. 13 | * Windows11 限制了一个应用只能创建一个一级菜单入口,并可以创建多个子菜单。本项目意在通过批量生成包的方式批量生成右键菜单捷径,因此每个包只添加一个一级菜单。如果你的使用场景是在一级菜单下创建多个子菜单,请考虑[ContextMenuForWindows11](https://github.com/ikas-mc/ContextMenuForWindows11)项目. 14 | * 要侧载以上的 Sparse Package, 必须使用信任的根证书签发它.对于本项目而言,你需要信任 `./Release`文件夹下的 `Key.cer`并添加到`受信任的根证书存储区`.当然你也可以自行签发信任证书并覆盖此文件. 15 | 16 | 效果如下: 17 | 18 | ![image](https://user-images.githubusercontent.com/44310445/174622439-ba5c8560-d9d5-442d-b80c-eb7694fbf077.png) 19 | 20 | ### 使用方法 21 | 为避免安装庞大的`Windows SDK`, 本项目采用Github Actions来完成产物编译. 22 | 23 | 请在Fork本项目后,进行如下修改. 24 | 1. 修改 `settings.json`. 25 | ``` 26 | `icon`: 右键菜单项的图标,可采用绝对路径指定(请使用运行时目标系统上的绝对路径并保证文件存在). 27 | `title`: 右键菜单项显示名称. 28 | `cmd`:点击右键菜单时执行的命令. %1 参数为选定文件/文件夹/当前文件夹(当在空白处右键点击)的绝对路径. 29 | `name`: 生成包的名称 30 | ``` 31 | 2. 启用 Actions, 并提交触发Actions. 32 | 3. 下载编译产物. 33 | 4. 信任 `Key.cer` 34 | 5. 安装Appx并添加DLL路径,在Appx路径下执行: 注意,以下代码注册了此路径为Appx包依赖的一部分,因此会被Appx包占用,无法修改和删除其中内容. 35 | ``` 36 | $releasePath = (resolve-path .) 37 | Add-AppxPackage ${releasePath}\apex-sparse.appx -ExternalLocation ${releasePath} 38 | ``` 39 | -------------------------------------------------------------------------------- /Release/ContextMenu.cpp: -------------------------------------------------------------------------------- 1 | // DLLMain.cpp : Defines the entry point for the context menu DLL handler. 2 | 3 | // See Also 4 | // https://github.com/microsoft/AppModelSamples/Samples/SparsePackages/PhotoStoreContextMenu/dllmain.cpp 5 | //#include "pch.h" 6 | #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容 7 | // Windows 头文件 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "wil\resource.h" 15 | #include 16 | #include 17 | #include 18 | #define ContextMenuUUID "67E8E06D-80A0-477B-87EC-109DBE5A1289" 19 | #define ContextMenuTitle L"搜索Everything" 20 | #define ContextMenuCMD L"\"C:\\Program Files\\Everything\\Everything.exe\" -path \"%1\"" 21 | #define ContextMenuIcon L"\"C:\\Program Files\\Everything\\Everything.exe\",0" 22 | using namespace Microsoft::WRL; 23 | 24 | BOOL APIENTRY DllMain(HMODULE hModule, 25 | DWORD ul_reason_for_call, 26 | LPVOID lpReserved) 27 | { 28 | switch (ul_reason_for_call) { 29 | case DLL_PROCESS_ATTACH: 30 | case DLL_THREAD_ATTACH: 31 | case DLL_THREAD_DETACH: 32 | case DLL_PROCESS_DETACH: 33 | break; 34 | } 35 | return TRUE; 36 | } 37 | 38 | class ExplorerCommandBase : public RuntimeClass, IExplorerCommand, IObjectWithSite> { 39 | public: 40 | virtual const wchar_t* Title() = 0; 41 | virtual const EXPCMDFLAGS Flags() { return ECF_DEFAULT; } 42 | virtual const EXPCMDSTATE State(_In_opt_ IShellItemArray* selection) { return ECS_ENABLED; } 43 | 44 | // IExplorerCommand 45 | IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name) 46 | { 47 | *name = nullptr; 48 | auto title = wil::make_cotaskmem_string_nothrow(Title()); 49 | RETURN_IF_NULL_ALLOC(title); 50 | *name = title.release(); 51 | return S_OK; 52 | } 53 | IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon) 54 | { 55 | //wchar_t str_data[1028]; 56 | //DWORD size = sizeof(str_data); 57 | //RETURN_IF_FAILED(RegGetValue( 58 | // HKEY_CLASSES_ROOT, L"@@ROOT_KEY@@", L"Icon", 59 | // RRF_RT_REG_EXPAND_SZ | RRF_NOEXPAND, NULL, str_data, &size 60 | //)); 61 | return SHStrDup(ContextMenuIcon, icon); 62 | } 63 | IFACEMETHODIMP GetToolTip(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* infoTip) 64 | { 65 | *infoTip = nullptr; 66 | return E_NOTIMPL; 67 | } 68 | IFACEMETHODIMP GetCanonicalName(_Out_ GUID* guidCommandName) 69 | { 70 | *guidCommandName = GUID_NULL; 71 | return S_OK; 72 | } 73 | IFACEMETHODIMP GetState(_In_opt_ IShellItemArray* selection, _In_ BOOL okToBeSlow, _Out_ EXPCMDSTATE* cmdState) 74 | { 75 | *cmdState = State(selection); 76 | return S_OK; 77 | } 78 | IFACEMETHODIMP Invoke(_In_opt_ IShellItemArray* selection, _In_opt_ IBindCtx*) noexcept 79 | try { 80 | HWND parent = nullptr; 81 | if (m_site) { 82 | ComPtr oleWindow; 83 | RETURN_IF_FAILED(m_site.As(&oleWindow)); 84 | RETURN_IF_FAILED(oleWindow->GetWindow(&parent)); 85 | } 86 | 87 | if (selection) { 88 | DWORD count; 89 | RETURN_IF_FAILED(selection->GetCount(&count)); 90 | 91 | IShellItem* psi; 92 | LPWSTR itemName; 93 | 94 | wchar_t cmdline_buf[1028]; 95 | DWORD size = sizeof(cmdline_buf); 96 | 97 | 98 | 99 | for (DWORD i = 0; i < count; ++i) { 100 | selection->GetItemAt(i, &psi); 101 | RETURN_IF_FAILED(psi->GetDisplayName(SIGDN_FILESYSPATH, &itemName)); 102 | 103 | std::wstring cmdline= ContextMenuCMD ; 104 | cmdline = cmdline.replace(cmdline.find(L"%1"), 2, itemName); 105 | 106 | STARTUPINFO si = {}; 107 | PROCESS_INFORMATION pi = {}; 108 | 109 | CreateProcess( 110 | nullptr, (LPWSTR)cmdline.c_str(), 111 | nullptr, nullptr, false, 0, nullptr, nullptr, &si, &pi); 112 | } 113 | } 114 | 115 | return S_OK; 116 | } 117 | CATCH_RETURN(); 118 | 119 | IFACEMETHODIMP GetFlags(_Out_ EXPCMDFLAGS* flags) 120 | { 121 | *flags = Flags(); 122 | return S_OK; 123 | } 124 | IFACEMETHODIMP EnumSubCommands(_COM_Outptr_ IEnumExplorerCommand** enumCommands) 125 | { 126 | *enumCommands = nullptr; 127 | return E_NOTIMPL; 128 | } 129 | 130 | // IObjectWithSite 131 | IFACEMETHODIMP SetSite(_In_ IUnknown* site) noexcept 132 | { 133 | m_site = site; 134 | return S_OK; 135 | } 136 | IFACEMETHODIMP GetSite(_In_ REFIID riid, _COM_Outptr_ void** site) noexcept { return m_site.CopyTo(riid, site); } 137 | 138 | protected: 139 | ComPtr m_site; 140 | }; 141 | 142 | class __declspec(uuid(ContextMenuUUID)) ExplorerCommandHandler final : public ExplorerCommandBase { 143 | public: 144 | const wchar_t* Title() override { return ContextMenuTitle; } 145 | }; 146 | 147 | CoCreatableClass(ExplorerCommandHandler) 148 | CoCreatableClassWrlCreatorMapInclude(ExplorerCommandHandler) 149 | 150 | STDAPI DllGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IActivationFactory** factory) 151 | { 152 | return Module::GetModule().GetActivationFactory(activatableClassId, factory); 153 | } 154 | 155 | STDAPI DllCanUnloadNow() 156 | { 157 | return Module::GetModule().GetObjectCount() == 0 ? S_OK : S_FALSE; 158 | } 159 | 160 | STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _COM_Outptr_ void** instance) 161 | { 162 | return Module::GetModule().GetClassObject(rclsid, riid, instance); 163 | } 164 | -------------------------------------------------------------------------------- /Release/Key.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lx200916/ContextMenuShortcuts_Win11/dd15ea477ddefbd5c0d5410c67a863f9e2af87be/Release/Key.cer -------------------------------------------------------------------------------- /Release/Key.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lx200916/ContextMenuShortcuts_Win11/dd15ea477ddefbd5c0d5410c67a863f9e2af87be/Release/Key.pfx -------------------------------------------------------------------------------- /Release/Source.def: -------------------------------------------------------------------------------- 1 | LIBRARY 2 | EXPORTS 3 | DllCanUnloadNow PRIVATE 4 | DllGetClassObject PRIVATE 5 | DllGetActivationFactory PRIVATE -------------------------------------------------------------------------------- /Release/sparse-pkg/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lx200916/ContextMenuShortcuts_Win11/dd15ea477ddefbd5c0d5410c67a863f9e2af87be/Release/sparse-pkg/.gitkeep -------------------------------------------------------------------------------- /Release/sparse-pkg/AppxManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | Everything 17 | Microsoft Corporation 18 | icon.png 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Release/sparse-pkg/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lx200916/ContextMenuShortcuts_Win11/dd15ea477ddefbd5c0d5410c67a863f9e2af87be/Release/sparse-pkg/icon.png -------------------------------------------------------------------------------- /build.ps1: -------------------------------------------------------------------------------- 1 | function Get-Escaped { 2 | param ( 3 | $WordParam 4 | ) 5 | if ($WordParam -eq $null) { 6 | return "" 7 | } 8 | return $WordParam.replace('\','\\').replace('"','\"') 9 | } 10 | 11 | $settings=(Get-Content .\settings.json)|ConvertFrom-Json 12 | $icon = Get-Escaped -WordParam $settings.icon 13 | $title = Get-Escaped -WordParam $settings.title 14 | $cmd = Get-Escaped -WordParam $settings.cmd 15 | $uuid = [System.Guid]::NewGuid().toString().toUpper() 16 | $name = $settings.name 17 | # Write-Output $cmd $title $icon 18 | (Get-Content .\ContextMenuDLL\DLLMain.cpp).Replace("@@TITLE@@",$title).Replace("@@ICON@@",$icon).Replace("@@CMD@@",$cmd).Replace("@@UUID@@",$uuid) | Out-File -Encoding utf8 .\Release\ContextMenu.cpp -Force 19 | (Get-Content .\template\AppxManifest.xml).Replace("@@NAME@@",$name).Replace("@@UUID@@",$uuid).Replace("@@TITLE@@",$title) | Out-File -Encoding utf8 .\Release\sparse-pkg\AppxManifest.xml -Force 20 | Invoke-WebRequest https://www.nuget.org/api/v2/package/Microsoft.Windows.ImplementationLibrary/1.0.201120.3 -OutFile Release\wil.zip; Expand-Archive -Force -LiteralPath Release\wil.zip Release\WilUnzipped; Copy-Item -Force -r "Release\WilUnzipped\include\wil" Release 21 | # Begin Compile 22 | cl.exe /c /Zi /nologo /W3 /WX- /diagnostics:column /sdl /Oi /GL /O2 /Oy- /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /permissive- /Fp"Release\ContextMenu.pch" /Fo"Release\\" /Fd"Release\vc142.pdb" /external:W3 /Gd /TP /analyze- /FC /errorReport:queue "Release\ContextMenu.cpp" 23 | link.exe /ERRORREPORT:QUEUE /OUT:"Release\ContextMenu.dll" /INCREMENTAL:NO /NOLOGO runtimeobject.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /DEF:"Release\Source.def" /MANIFEST /MANIFESTUAC:NO /manifest:embed /PDB:"Release\ContextMenu.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG:incremental /LTCGOUT:"Release\ContextMenu.iobj" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"Release\ContextMenu.lib" /MACHINE:%ARCH% /DLL "Release\ContextMenu.obj" 24 | MakeAppx.exe pack /d "Release\\sparse-pkg\\" /p "Release\apex-sparse.appx" /nv 25 | SignTool.exe sign /fd SHA256 /a /f "Release\Key.pfx" "Release\apex-sparse.appx" -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "icon":"\"C:\\Program Files\\Everything\\Everything.exe\",0", 3 | "title":"搜索Everything", 4 | "cmd":"\"C:\\Program Files\\Everything\\Everything.exe\" -path \"%1\"", 5 | "name":"Everything", 6 | } -------------------------------------------------------------------------------- /template/AppxManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | @@NAME@@ 17 | Microsoft Corporation 18 | icon.png 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | --------------------------------------------------------------------------------