Saturday, July 18, 2015

windows 10 - How to run batch file as with admin privileges

I need to run a batch file on a users desktop and run it with admin privileges to restart a service. I can get the batch file to work when I am logged in as local admin


Here is the script, please help


NET LOCALGROUP administrators "NT Authority\Local Service" /add
netsh winsock reset catalog
Set /p nul
Shutdown -r -t 1

Or can any one give me a way to run the cmd as a user without needing admin rights

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...