mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update system.js
This commit is contained in:
parent
1d6db047db
commit
e8acc57830
|
@ -8,7 +8,7 @@ var scope = {
|
|||
require: global.require
|
||||
};
|
||||
|
||||
var SHELL = require('lib/shell');
|
||||
var SHELL = require("lib/shell");
|
||||
var WSH = CreateObject("WScript.Shell");
|
||||
var WMI = GetObject("winmgmts:\\\\.\\root\\CIMV2");
|
||||
var FSO = CreateObject("Scripting.FileSystemObject");
|
||||
|
@ -113,4 +113,15 @@ scope.getCurrentProcesses = function() {
|
|||
return processes;
|
||||
};
|
||||
|
||||
scope.createShortcut = function(shoutcutName, fileName) {
|
||||
var workingDirectory = scope.getCurrentWorkingDirectory();
|
||||
var desktopPath = WSH.SpecialFolders("Desktop");
|
||||
var link = WSH.CreateShortcut(desktopPath + "\\" + shoutcutName + ".lnk");
|
||||
link.IconLocation = fileName + ",1";
|
||||
link.TargetPath = workingDirectory + "\\" + fileName;
|
||||
link.WindowStyle = 3;
|
||||
link.WorkingDirectory = workingDirectory;
|
||||
link.Save();
|
||||
};
|
||||
|
||||
return scope;
|
||||
|
|
Loading…
Reference in New Issue
Block a user