mIRC Home    About    Download    Register    News    Help

Print Thread
#263609 28/08/18 12:33 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I am trying to execute an .bat file but everytime i use /run for that purpose i got Windows input error that cannot find 'npm' and to check for vaild name, it is strange because when i try to run it normally by double click on it then is working but with /run doesn't.

BAT source code: https://pastebin.com/XdvmFrgm

If someone has an other way like VBS or PS1 it is accepted.

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
No need for vbs or the like:
Code:
//run cmd.exe /q /c example.bat


I am SReject
My Stuff
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
It executing the .bat file but it returns an Windows Input Error:



Error Message: Windows can not find 'npm' Make sure you typed the name correctly and try again


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
run cmd.exe via start menu and enter

Code:
npm -v


If that reports an error, then you don't have npm installed correctly


I am SReject
My Stuff
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
5.6.0

:P


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
try
Code:
call start "npm for mirc" ...


I am SReject
My Stuff
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I don't have that json file in that location so i get the following error:

Code:
npm ERR! path C:\Users\westo\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\westo\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\westo\AppData\Roaming\npm-cache\_logs\2018-08-28T19_34_48_351Z-debug.log


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard