0

It's been quite a while since I've written .bat files and was wondering if it could help me run a .js file located in a directory, through the node.js command prompt. It's quite tedious to have to run the node.js command prompt with administrator rights, change directory to the right location and run the .js file daily, thus I'd like a quicker way of doing that, but how do I do this?

rvddesign
  • 3
  • 3
  • Maybe this will help http://stackoverflow.com/questions/6811372/how-to-code-a-bat-file-to-always-run-as-admin-mode – Kiran Pagar Jun 24 '16 at 16:39
  • Are you open to using powershell instead of batch? – dvlsg Jun 24 '16 at 16:46
  • I've tried the first method, however it appears not to be working properly yet. There is no administrator prompt, and the command window appears to close at the end of the last batch command (which I still want to perform an actions with it). powershell? I rather not be installing additional software for this. – rvddesign Jun 25 '16 at 11:42
  • Easily use nodemo. You can write a nodemon command that starts your NodeJs server. Also you can set this bat file as a windows service that its action is set to auto startup. – MeirDayan Jun 21 '20 at 04:41

0 Answers0