Update bootstrap,js and relative files

This commit is contained in:
Namhyeon Go 2020-07-21 16:03:36 +09:00
parent 882b274f4b
commit 651b2b4d38
4 changed files with 6 additions and 17 deletions

View File

@ -1,12 +0,0 @@
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\welsonjs]
@="URL:welsonjs"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\welsonjs\shell]
[HKEY_CLASSES_ROOT\welsonjs\shell\open]
[HKEY_CLASSES_ROOT\welsonjs\shell\open\command]
@="cscript \"%PROGRAMFILES%\\welsonjs\\app.js\" uriloader \"%1\""

Binary file not shown.

9
bootstrap.js vendored
View File

@ -15,16 +15,19 @@ return {
console.log("Starting unlock files...");
PS.execCommand("dir | Unblock-File");
// import necessary registry
REG.importFromFile("app/assets/reg/Allow_ADO_CORS.reg");
//REG.importFromFile("app/assets/reg/Add_URI_Scheme.reg");
// Allow CROS to ADO
console.log("Adjusting CROS policy to ADO...");
REG.write(REG.HKCU, "SOFTWARE\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Lockdown_Zones\\4", "1406", "00000000", REG.DWORD);
REG.write(REG.HKLM, "SOFTWARE\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Lockdown_Zones\\4", "1406", "00000000", REG.DWORD);
// register URI scheme
console.log("Registering URI scheme...");
REG.write(REG.HKCR, "welsonjs", "", "URL:welsonjs", REG.STRING);
REG.write(REG.HKCR, "welsonjs", "URL Protocol", "", REG.STRING);
REG.write(REG.HKCR, "welsonjs\\shell\\open\\command", "", "cscript " + SYS.getCurrentScriptDirectory() + "\\app.js uriloader \"%1\"", REG.STRING);
// open HTA file
console.log("Trying open GUI...");
SHELL.run("app.hta");
console.log("done");

View File

@ -1,5 +1,3 @@
@echo off
cscript app.js bootstrap
echo done