From cc88d26b5711754b09e457ff3ea829d016962dc7 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 18 Nov 2019 04:48:34 -0800 Subject: [PATCH] add hush:// URI protocol handler for windows --- contrib/hush-uri.bat | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 contrib/hush-uri.bat diff --git a/contrib/hush-uri.bat b/contrib/hush-uri.bat new file mode 100644 index 000000000..8e6ac1dee --- /dev/null +++ b/contrib/hush-uri.bat @@ -0,0 +1,46 @@ +@Echo On +Title Reg Converter v1.1 & Color 1A +REM ~ call :IsAdmin + +call :RegExport +Exit + +:RegExport +Set RegFile="%Temp%\~etsaclu.tmp" + +Set "pirate=%~dp0" +set "pirate=%pirate:\=\\%" + +If Exist %RegFile% ( + Attrib -R -S -H %RegFile% & Del /F /Q %RegFile% + If Exist %RegFile% cls & Echo Could not delete file %RegFile% & Pause +) +> %RegFile% Echo Windows Registry Editor Version 5.00 +>> %RegFile% Echo. +>> %RegFile% Echo [HKEY_CLASSES_ROOT\hush] +>> %RegFile% Echo @="URL:hush protocol" +>> %RegFile% Echo "URL Protocol"="" +>> %RegFile% Echo. +>> %RegFile% Echo [HKEY_CLASSES_ROOT\hush\DefaultIcon] +>> %RegFile% Echo @="sevenseas.exe" +>> %RegFile% Echo. +>> %RegFile% Echo [HKEY_CLASSES_ROOT\hush\Shell] +>> %RegFile% Echo. +>> %RegFile% Echo [HKEY_CLASSES_ROOT\hush\Shell\Open] +>> %RegFile% Echo. +>> %RegFile% Echo [HKEY_CLASSES_ROOT\hush\Shell\Open\Command] +>> %RegFile% Echo @="%hush%silentdragon.exe \"%%1\"" + +Start /Wait %systemroot%\Regedit.exe /S %RegFile% +Del %RegFile% +goto:eof + +:IsAdmin +Reg.exe query "HKU\S-1-5-19\Environment" +If Not %ERRORLEVEL% EQU 0 ( + Cls & Echo You must have administrator rights to continue ... + Pause & Exit +) +Cls +goto:eof +