D
D
dlakazov2019-03-13 15:41:27
Windows
dlakazov, 2019-03-13 15:41:27

How to run bat file as admin or exec on node.js in windows?

I have a project initialized in my folder, I open a command line in the same folder, I write node index.js, and it has an executive module, it executes terminal commands, I try to start mysql, it says that I have no rights. I also try to execute this command through a batch file, does not want to comply. It is clear that he wants the command line to be launched on behalf of the admin, but such a question is how to do this through a script ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-03-13
@dlakazov

Run your index.js as admin
Where username is the admin username

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question