Create Desktop Icon that will restart a service in Windows 7
Posted on 2010-09-21
We are running OpenVPN on our laptops to connect when out of the office. Most of the time it works great, but every so often the OpenVPNService needs to be restarted for the connection to be made.
I have created a .bat file with:
Net Stop OpenVPNService
Net Start OpenVPNService
which works great on our WinXP machines. But in Win7 the script doesn't work unless the .bat file is Run as Administrator.
Now I know that it's super easy to right-click on the icon and choose "Run as Administrator." Unfortunately the sales reps that will use this icon twice a year will never remember this.
Is there an easy way to make it so the .bat could be double-clicked on and just work?