Node.js execute .lnc file
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
There was a problem when opening a shortcut (.lnk) through node.js. How should I open it?
var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();javascript node.js npm node-modules child-process
add a comment |
There was a problem when opening a shortcut (.lnk) through node.js. How should I open it?
var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();javascript node.js npm node-modules child-process
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03
add a comment |
There was a problem when opening a shortcut (.lnk) through node.js. How should I open it?
var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();javascript node.js npm node-modules child-process
There was a problem when opening a shortcut (.lnk) through node.js. How should I open it?
var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();var exec = require('child_process').execFile;
var runLibreOffice =function(){
exec('D:\Downloads\bot\botgo.lnk', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
runLibreOffice();javascript node.js npm node-modules child-process
javascript node.js npm node-modules child-process
edited Nov 22 '18 at 20:03
Даниил Рыбальченко
asked Nov 22 '18 at 19:44
Даниил РыбальченкоДаниил Рыбальченко
112
112
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03
add a comment |
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03
add a comment |
1 Answer
1
active
oldest
votes
maybe with windows-shortcuts you can read and execute de .exe into the shortcut.
https://www.npmjs.com/package/windows-shortcuts
ws.query("C:/ProgramData/Microsoft/Windows/Start Menu/Windows Update.lnk", console.log);
/* From console:
null { expanded:
{ args: 'startmenu',
workingDir: 'C:\Windows\system32',
icon: 'C:\Windows\system32\wucltux.dll' },
target: '%windir%\system32\wuapp.exe',
args: 'startmenu',
workingDir: '%windir%\system32',
runStyle: 1,
icon: '%windir%\system32\wucltux.dll',
iconIndex: '0',
hotkey: 0,
desc: 'Delivers software updates and drivers, and provides automatic updating options.' }
*/
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437244%2fnode-js-execute-lnc-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
maybe with windows-shortcuts you can read and execute de .exe into the shortcut.
https://www.npmjs.com/package/windows-shortcuts
ws.query("C:/ProgramData/Microsoft/Windows/Start Menu/Windows Update.lnk", console.log);
/* From console:
null { expanded:
{ args: 'startmenu',
workingDir: 'C:\Windows\system32',
icon: 'C:\Windows\system32\wucltux.dll' },
target: '%windir%\system32\wuapp.exe',
args: 'startmenu',
workingDir: '%windir%\system32',
runStyle: 1,
icon: '%windir%\system32\wucltux.dll',
iconIndex: '0',
hotkey: 0,
desc: 'Delivers software updates and drivers, and provides automatic updating options.' }
*/
add a comment |
maybe with windows-shortcuts you can read and execute de .exe into the shortcut.
https://www.npmjs.com/package/windows-shortcuts
ws.query("C:/ProgramData/Microsoft/Windows/Start Menu/Windows Update.lnk", console.log);
/* From console:
null { expanded:
{ args: 'startmenu',
workingDir: 'C:\Windows\system32',
icon: 'C:\Windows\system32\wucltux.dll' },
target: '%windir%\system32\wuapp.exe',
args: 'startmenu',
workingDir: '%windir%\system32',
runStyle: 1,
icon: '%windir%\system32\wucltux.dll',
iconIndex: '0',
hotkey: 0,
desc: 'Delivers software updates and drivers, and provides automatic updating options.' }
*/
add a comment |
maybe with windows-shortcuts you can read and execute de .exe into the shortcut.
https://www.npmjs.com/package/windows-shortcuts
ws.query("C:/ProgramData/Microsoft/Windows/Start Menu/Windows Update.lnk", console.log);
/* From console:
null { expanded:
{ args: 'startmenu',
workingDir: 'C:\Windows\system32',
icon: 'C:\Windows\system32\wucltux.dll' },
target: '%windir%\system32\wuapp.exe',
args: 'startmenu',
workingDir: '%windir%\system32',
runStyle: 1,
icon: '%windir%\system32\wucltux.dll',
iconIndex: '0',
hotkey: 0,
desc: 'Delivers software updates and drivers, and provides automatic updating options.' }
*/
maybe with windows-shortcuts you can read and execute de .exe into the shortcut.
https://www.npmjs.com/package/windows-shortcuts
ws.query("C:/ProgramData/Microsoft/Windows/Start Menu/Windows Update.lnk", console.log);
/* From console:
null { expanded:
{ args: 'startmenu',
workingDir: 'C:\Windows\system32',
icon: 'C:\Windows\system32\wucltux.dll' },
target: '%windir%\system32\wuapp.exe',
args: 'startmenu',
workingDir: '%windir%\system32',
runStyle: 1,
icon: '%windir%\system32\wucltux.dll',
iconIndex: '0',
hotkey: 0,
desc: 'Delivers software updates and drivers, and provides automatic updating options.' }
*/
answered Nov 23 '18 at 10:22
CuchuCuchu
1,164815
1,164815
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53437244%2fnode-js-execute-lnc-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hello, this script shows any error? Have you seen nodejs.org/api/… ? const execFile = require('child_process').execFile; const child = execFile('node', ['--version'], (error, stdout, stderr) => {})
– Cuchu
Nov 22 '18 at 21:28
Hey. The script normally opens .exe files. But with .lnc problems with him. Shows this error: { Error: Command failed: D:Downloadsbotbotgo.lnk "D:Downloadsbotbotgo" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) killed: false, code: 1, signal: null, cmd: 'D:\Downloads\bot\botgo.lnk' }
– Даниил Рыбальченко
Nov 22 '18 at 21:45
Check this question and response stackoverflow.com/questions/41497183/…
– Cuchu
Nov 22 '18 at 21:49
More information about this problem dzone.com/articles/…
– Cuchu
Nov 22 '18 at 21:51
At the moment I got this code: spawn('D:\Downloads\bot\botgo.lnk', {shell : true}, function(err, data). When you run the file, nothing is displayed in the console and does not start.
– Даниил Рыбальченко
Nov 22 '18 at 22:03