Inno Setup - 右键单击文件时是否可以添加 "Edit with MyAppName"?
Inno Setup - Is it possible to add "Edit with MyAppName" when right clicking a file?
我正在使用 Inno Setup 为我的应用程序创建一个安装文件。在 Windows 操作系统上右键单击 PDF 文件时,我可以看到“使用 Adobe Acrobat 编辑”菜单项:
我想为我的应用程序添加一个类似的菜单项,使其显示为 "Edit with MyAppName"。这可能使用 Inno Setup 吗?
---------------------------------------- ---------------- 更新:
这是我尝试在 Inno Setup 中使用的注册表代码,但它不起作用:
Root: "HKCR"; Subkey: ".pdf"; ValueType: string; ValueData: "PDF_File"; Flags: uninsdeletevalue
Root: "HKCR"; Subkey: "PDF_File\shell\Edit with My PDF Editor"; ValueType: string; ValueData: """{app}\My PDF Editor.exe"" ""%1"""; Flags: uninsdeletevalue
Root: "HKCR"; Subkey: "PDF_File\DefaultIcon"; ValueType: string; ValueData: "{app}\images\my_pdf_editor_icon.ico"; Flags: uninsdeletevalue
我能够做到这一点,如果有人需要,我会在这里分享我的解决方案:
; Add 'My PDF Editor' menu item to the Shell menu for PDF files:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: none; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
; Specify icon for the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "Icon"; ValueData: "{app}\images\shortcut.ico"; Flags: uninsdeletekey
; Add separator before and after the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "SeparatorBefore"; ValueData: ""; Flags: uninsdeletekey
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "SeparatorAfter"; ValueData: ""; Flags: uninsdeletekey
; Define command for the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor\command"; ValueType: string; ValueName: ""; ValueData: """{app}\My PDF Editor.exe"" ""%1"""; Flags: uninsdeletekey
我正在使用 Inno Setup 为我的应用程序创建一个安装文件。在 Windows 操作系统上右键单击 PDF 文件时,我可以看到“使用 Adobe Acrobat 编辑”菜单项:
我想为我的应用程序添加一个类似的菜单项,使其显示为 "Edit with MyAppName"。这可能使用 Inno Setup 吗?
---------------------------------------- ---------------- 更新:
这是我尝试在 Inno Setup 中使用的注册表代码,但它不起作用:
Root: "HKCR"; Subkey: ".pdf"; ValueType: string; ValueData: "PDF_File"; Flags: uninsdeletevalue
Root: "HKCR"; Subkey: "PDF_File\shell\Edit with My PDF Editor"; ValueType: string; ValueData: """{app}\My PDF Editor.exe"" ""%1"""; Flags: uninsdeletevalue
Root: "HKCR"; Subkey: "PDF_File\DefaultIcon"; ValueType: string; ValueData: "{app}\images\my_pdf_editor_icon.ico"; Flags: uninsdeletevalue
我能够做到这一点,如果有人需要,我会在这里分享我的解决方案:
; Add 'My PDF Editor' menu item to the Shell menu for PDF files:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: none; ValueName: ""; ValueData: ""; Flags: uninsdeletekey
; Specify icon for the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "Icon"; ValueData: "{app}\images\shortcut.ico"; Flags: uninsdeletekey
; Add separator before and after the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "SeparatorBefore"; ValueData: ""; Flags: uninsdeletekey
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor"; ValueType: string; ValueName: "SeparatorAfter"; ValueData: ""; Flags: uninsdeletekey
; Define command for the menu item:
Root: "HKCR"; Subkey: "SystemFileAssociations\.pdf\shell\Edit with My PDF Editor\command"; ValueType: string; ValueName: ""; ValueData: """{app}\My PDF Editor.exe"" ""%1"""; Flags: uninsdeletekey