This commit is contained in:
Namhyeon Go 2020-12-08 15:43:59 +09:00
parent 76549e7228
commit ac6c568682
6 changed files with 28 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 164 KiB

12
bgloader.js Normal file
View File

@ -0,0 +1,12 @@
function main() {
var args = [];
var argl = WScript.arguments.length;
for (var i = 0; i < argl; i++) {
args.push(WScript.arguments(i));
}
var objShell = WScript.CreateObject("WScript.Shell");
objShell.Run(args.join(' '), 0, true);
}
main();

View File

@ -116,16 +116,14 @@ var ChromeObject = function() {
this.userDataDir = SHELL.getPathOfMyDocuments() + "\\UserData_Chrome_" + this.profileName;
}
var shell = SHELL.create()
.setWorkingDirectory(this.workingDirectory)
.setVisibleWindow(true)
.runAs(this.binPath, [
"--profile-directory=\"" + this.profileName + "\"",
"--proxy-server=\"socks5://127.0.0.1:" + this.proxyPort + "\"",
"--user-data-dir=\"" + this.userDataDir + "\"",
"\"" + url + "\""
])
;
var shell = SHELL.create();
shell.setWorkingDirectory(this.workingDirectory);
shell.runAs(this.binPath, [
"--profile-directory=\"" + this.profileName + "\"",
"--proxy-server=\"socks5://127.0.0.1:" + this.proxyPort + "\"",
"--user-data-dir=\"" + this.userDataDir + "\"",
"\"" + url + "\""
]);
sleep(3000);
shell.release();
} catch (e) {

View File

@ -116,12 +116,14 @@ var ShellObject = function() {
if (!FILE.fileExists(path)) {
var link = this.interface.CreateShortcut(path);
link.TargetPath = "cmd";
link.Arguments = "/q /c " + this.build(cmd);
link.WindowStyle = 7;
//link.TargetPath = "cmd";
//link.Arguments = "/q /c " + this.build(cmd);
link.TargetPath = "wscript";
link.Arguments = "bgloader.js " + this.build(cmd);
link.WindowStyle = 1;
link.WorkingDirectory = workingDirectory;
//link.Hotkey = "";
//link.IconLocation = "";
link.IconLocation = require("lib/system").getCurrentScriptDirectory() + "\\app\\favicon.ico";
link.Save();
}
};

View File

@ -25,7 +25,7 @@ var downloadFile = function(url) {
// run installer
SHELL.run(["start", "mysetup.exe"]);
// close window
// close application
exit();
};

View File

@ -1 +1 @@
1
4