Inno setup registry

独自空忆成欢 提交于 2019-12-25 04:26:46

问题


What can I add to the win registry so that the explorer context menu, when you right click on a file, gains an entry that calls "\path\to\exe" "path\to\this\file\you\right\clicked\on"? If that's possible to be done in Inno setup easily, could you possibly provide me with some examples? (As well as get rid of the registry key upon uninstall)

Thanks.


回答1:


What I did in MSBuild Launch Pad (http://msbuildlaunchpad.codeplex.com/) is like this,

  1. Your application must handle arguments from Windows Explorer properly.
  2. The following registry key are used by the installer,

    [Registry]

    Root: HKCR; Subkey: SystemFileAssociations.sln\shell\MSBuild; ValueType: string; Flags: uninsdeletekey deletekey; ValueName: Icon; ValueData: """{app}\MSBuild_APPICON.ico"""

    Root: HKCR; Subkey: SystemFileAssociations.csproj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.vbproj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.vcxproj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.oxygene\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.shfbproj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.ccproj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon Root: HKCR; Subkey: SystemFileAssociations.proj\shell\MSBuild; ValueType: string; ValueData: """{app}\MSBuild_APPICON.ico"""; Flags: uninsdeletekey deletekey; ValueName: Icon

    Root: HKCR; Subkey: SystemFileAssociations.sln\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.csproj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.vbproj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.vcxproj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.oxygene\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.shfbproj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.ccproj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey

    Root: HKCR; Subkey: SystemFileAssociations.proj\shell\MSBuild\command; ValueType: string; ValueData: """{app}\MSBuildLaunchPad.exe"" ""%1"""; Flags: uninsdeletekey deletekey



来源:https://stackoverflow.com/questions/4485710/inno-setup-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!