I have create a batch file which use to install my program as windows services. Content of the batch file:
> C:\Project\Test\InstallUtil.exe
> "C:\Project\Test\ROServerService\Server\bin\Debug\myservices.exe"
Currently it needs the user to right-click the batch file and 'Run as Administrator' in order to success. How do we avoid 'Run as Administrator'? I mean can we use some command in the batch file to tell Windows to run this batch file as administrator?
This way worked for me in the past:
Note that I'm running the commands in your batch file directly here, but of course you can also run the batch file itself: