Inno Setup:扩展 Windows 默认应用程序列表 [英] Inno Setup: Extending Windows default apps list

查看:9
本文介绍了Inno Setup:扩展 Windows 默认应用程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将我的应用程序列在 Windows 默认应用程序列表中?

我有一个特殊的基于 Java 的视频播放器应用程序,其中包含由 Inno Setup 创建的安装程序.我希望我的应用程序列在 Windows 10 上的可选视频播放器列表中(我也不知道如何使用旧的 Windows 版本).

解决方案

有关一般信息,请参阅:

  • How is it possible to have listed my application on the Windows default apps list?

    I have a special Java based video player application with an installer created by Inno Setup. I want my application to be listed on the selectable video players list on Windows 10 (I also don't know how to do it with older Windows versions).

    解决方案

    For generic information, see:

    In Inno Setup, you implement this using [Registry] section:

    [Registry]
    ; Create the application capability key
    ; (The location of the key does not matter)
    Root: HKLM; Subkey: "SoftwareMy Company"; Flags: uninsdeletekeyifempty
    Root: HKLM; Subkey: "SoftwareMy CompanyMy Program"; Flags: uninsdeletekeyifempty
    Root: HKLM; Subkey: "SoftwareMy CompanyMy ProgramCapability"; 
        ValueType: string; ValueName: "ApplicationDescription"; 
        ValueData: "This is My Program that does stuff"; Flags: uninsdeletevalue
    Root: HKLM; Subkey: "SoftwareMy CompanyMy ProgramCapability"; 
        ValueType: string; ValueName: "ApplicationName"; ValueData: "My Program"; 
        Flags: uninsdeletevalue
    ; List of extensions the application supports
    Root: HKLM; 
        Subkey: "SoftwareMy CompanyMy ProgramCapabilityFileAssociations"; 
        ValueType: string; ValueName: ".jpg"; ValueData: "MyProgram.JPEG"; 
        Flags: uninsdeletevalue
    
    ; Add the capability key to list of registered applications
    Root: HKLM; Subkey: "SoftwareRegisteredApplications"; 
        ValueType: string; ValueName: "My Program"; 
        ValueData: "SoftwareMy CompanyMy ProgramCapability"; 
        Flags: uninsdeletevalue
    
    ; For each extension that the application supports
    Root: HKCR; Subkey: "MyProgram.JPEG"; Flags: uninsdeletekeyifempty
    Root: HKCR; Subkey: "MyProgram.JPEG"; 
        ValueType: string; ValueName: ""; ValueData: "MyProgram JPEG"; 
        Flags: uninsdeletevalue
    Root: HKCR; Subkey: "MyProgram.JPEGDefaultIcon"; Flags: uninsdeletekeyifempty
    Root: HKCR; Subkey: "MyProgram.JPEGDefaultIcon"; 
        ValueType: string; ValueName: ""; ValueData: "{app}MyProg.exe,1"; 
        Flags: uninsdeletevalue
    Root: HKCR; Subkey: "MyProgram.JPEGShell"; Flags: uninsdeletekeyifempty
    Root: HKCR; Subkey: "MyProgram.JPEGShellopen"; Flags: uninsdeletekeyifempty
    Root: HKCR; Subkey: "MyProgram.JPEGShellopenCommand"; 
        Flags: uninsdeletekeyifempty
    Root: HKCR; Subkey: "MyProgram.JPEGShellopenCommand"; 
        ValueType: string; ValueName: ""; ValueData: """{app}MyProg.exe"" ""%1"""; 
        Flags: uninsdeletevalue
    


    In Inno Setup 6, you should modify the code as follows to support non-administrative install mode:

    1. Replace HKLM in the first block with HKA;
    2. Replace HKCR with HKA and add the SoftwareClasses prefix to the Subkey in the second block.


    这篇关于Inno Setup:扩展 Windows 默认应用程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆