0

I have a bat file and I can run this file as administrator by right click on it. Now I create a link which calls the bat file on html page. I want to hit the link and run the file as administrator.

The code which calls my file normal way.

<a href="C:\Users\c\Desktop\service-restart.bat">Restart DirectDataLink</a>
coskukoz
  • 332
  • 2
  • 20

1 Answers1

-2
  • Adjust the script (Link) below the line ::START that needs to run elevated in below posted batch script. For your example: call service-restart.bat and save it as RunElevated.bat
  • Change your link to <a href="C:\Users\c\Desktop\RunElevated.bat">Restart DirectDataLink</a>.

The RunElavated will call your batch script and will try to "selfelevate".