Run a node js script as administrator

  administrator, node.js, windows

I have a small nodejs script that simply changes the system date using exec() command. I am using it for automation purpose, so I need it to change the system date on just a click.

Now the issue is – I need to run it as administrator to change the date or else the system will throw an error.

I don’t know how I can do so. (I can run nodejs prompt as administrator but don’t know how to do it for an individual script)

I am on windows 8.1.

Source: Windows Questions