mIRC Home    About    Download    Register    News    Help

Print Thread
#263609 28/08/18 12:33 PM
Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
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!

Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
No need for vbs or the like:
Code:
//run cmd.exe /q /c example.bat

Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
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

Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
run cmd.exe via start menu and enter

Code:
npm -v


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

Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
5.6.0

:P

Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
try
Code:
call start "npm for mirc" ...

Joined: Dec 2008
Posts: 1,483
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
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


Link Copied to Clipboard