In our old 2003 server, we were able to start and stop services by using a bat file(with net stop and net start commands). When ever the services stops(MQ listner services), we force start an autosys job which will trigger the bat script to start the services.
But after moving to Windows 2012, this set up no longer works and we ended up logging on weekends/nights just to start the services. My ID is part of power users group and I can start/stop the same services on GUI and command line by using Administrator mode. But it is not working with bat script and we get below error message.
System error 5 has occurred.
Access is denied.
How can we tell the script to choose Command prompt(Admin) while running it?