summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-03-07 17:24:55 +0000
committerGitHub <noreply@github.com>2021-03-07 17:24:55 +0000
commitdea76806040db2fa7bb27f0c87e817b97c7e04a2 (patch)
tree5974f17387ec2e22c0ba58d67d00ae5a8ec9af24
parentFix popup opening at wrong place (diff)
parentadd matrix uri handler registry values in installer (diff)
downloadnheko-dea76806040db2fa7bb27f0c87e817b97c7e04a2.tar.xz
Merge pull request #510 from Jedi18/master
Add matrix uri handler registry values in windows installer
-rw-r--r--deploy/installer/gui/installscript.qs12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/installer/gui/installscript.qs b/deploy/installer/gui/installscript.qs

index 4cfa284f..d3a51f34 100644 --- a/deploy/installer/gui/installscript.qs +++ b/deploy/installer/gui/installscript.qs
@@ -23,6 +23,18 @@ Component.prototype.createOperations = function() component.addOperation( "CreateShortcut", "@TargetDir@\\nheko.exe", "@DesktopDir@\\nheko.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\nheko.exe", "iconId=0", "description=Desktop client for the Matrix protocol"); + + var reg = installer.environmentVariable("SystemRoot") + "\\System32\\reg.exe"; + var key= "HKEY_CLASSES_ROOT\\matrix"; + component.addOperation("Execute", reg, "ADD", key, "/f", "/t", "REG_SZ", "/d", "URL:Matrix Protocol"); + component.addOperation("Execute", reg, "ADD", key, "/f", "/v", "URL Protocol", "/t", "REG_SZ"); + var iconkey = "HKEY_CLASSES_ROOT\\matrix\\DefaultIcon"; + component.addOperation("Execute", reg, "ADD", iconkey, "/f", "/t", "REG_SZ", "/d", "@TargetDir@\\nheko.exe,1"); + component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell", "/f"); + component.addOperation("Execute", reg, "ADD", "HKEY_CLASSES_ROOT\\matrix\\shell\\open", "/f"); + var commandkey = "HKEY_CLASSES_ROOT\\matrix\\shell\\open\\command" + component.addOperation("Execute", reg, "ADD", commandkey, "/f"); + component.addOperation("Execute", reg, "ADD", commandkey, "/f", "/t", "REG_SZ", "/d", "\"@TargetDir@\\nheko.exe\" \"%1\""); } } catch( e )