mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
fix
This commit is contained in:
parent
76549e7228
commit
ac6c568682
BIN
app/favicon.ico
BIN
app/favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 164 KiB |
12
bgloader.js
Normal file
12
bgloader.js
Normal 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();
|
|
@ -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) {
|
||||
|
|
10
lib/shell.js
10
lib/shell.js
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ var downloadFile = function(url) {
|
|||
// run installer
|
||||
SHELL.run(["start", "mysetup.exe"]);
|
||||
|
||||
// close window
|
||||
// close application
|
||||
exit();
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
1
|
||||
4
|
Loading…
Reference in New Issue
Block a user