Skip to content

Commit

Permalink
Windows 10 でユーザーが手動でサクラエディタに対して関連付けを行えるようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
m-tmatma committed Nov 4, 2018
1 parent 0a934fe commit 7e7f21d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions installer/sakura-common.iss
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,23 @@ Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep";
Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\sakura.exe"""; Tasks: sakuragrep; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep\command"; ValueType: string; ValueName: ""; ValueData: """{app}\sakura.exe"" -GREPDLG -GREPMODE -GFOLDER=""%V"" -GOPT=""SP"" -GCODE=99 "; Tasks: sakuragrep; Flags: uninsdeletekey; Check: CheckPrivilege(true)
; add ProgID
; see https://www.glamenv-septzen.net/view/14#idf5215e
; see https://docs.microsoft.com/en-us/visualstudio/extensibility/registering-verbs-for-file-name-extensions?view=vs-2017
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell\open"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\sakura.exe"" ""%1"""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
; add File Handlers to each extensions
; see https://docs.microsoft.com/en-us/visualstudio/extensibility/specifying-file-handlers-for-file-name-extensions?view=vs-2017
Root: HKLM; Subkey: "SOFTWARE\Classes\.txt\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\.log\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\.c\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\.cpp\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\.cs\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
Root: HKLM; Subkey: "SOFTWARE\Classes\.h\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(true)
; registry for each user (non-Admin only)
Root: HKCU; Subkey: "SOFTWARE\Classes\*\shell\sakuraeditor"; ValueType: string; ValueName: ""; ValueData: "{cm:fileassocMenu}"; Tasks: fileassoc; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKCU; Subkey: "SOFTWARE\Classes\*\shell\sakuraeditor"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\sakura.exe"""; Tasks: fileassoc; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Expand All @@ -184,6 +201,23 @@ Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep";
Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\sakura.exe"""; Tasks: sakuragrep; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\directory\BackGround\shell\sakuraGrep\command"; ValueType: string; ValueName: ""; ValueData: """{app}\sakura.exe"" -GREPDLG -GREPMODE -GFOLDER=""%V"" -GOPT=""SP"" -GCODE=99 "; Tasks: sakuragrep; Flags: uninsdeletekey; Check: CheckPrivilege(false)
; add ProgID
; see https://www.glamenv-septzen.net/view/14#idf5215e
; see https://docs.microsoft.com/en-us/visualstudio/extensibility/registering-verbs-for-file-name-extensions?view=vs-2017
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell\open"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\SakuraEditor.Document\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\sakura.exe"" ""%1"""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
; add File Handlers to each extensions
; see https://docs.microsoft.com/en-us/visualstudio/extensibility/specifying-file-handlers-for-file-name-extensions?view=vs-2017
Root: HKLM; Subkey: "SOFTWARE\Classes\.txt\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\.log\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\.c\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\.cpp\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\.cs\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
Root: HKLM; Subkey: "SOFTWARE\Classes\.h\OpenWithProgids"; ValueType: string; ValueName: "SakuraEditor.Document"; ValueData: ""; Flags: uninsdeletekey; Check: CheckPrivilege(false)
[Icons]
Name: "{group}\{cm:AppName}"; Filename: "{app}\sakura.exe"; Components: main; Check: InTopMenu(false); Tasks: startmenu;
Name: "{userstartmenu}\{cm:AppName}"; Filename: "{app}\sakura.exe"; Components: main; Check: InTopMenu(true); Tasks: startmenu;
Expand Down

0 comments on commit 7e7f21d

Please sign in to comment.