0

I have installed MariaDB 10.4 Series in Window 7. But there's no option for start/stop and restart in installation folder. So i had to stopped through services.msc tool. Hence I have created batch script but when I run the script then I am getting "Access is denied" error message because i run the script direct from desktop. I don't want to run cmd as administrator. I want to run the script direct by clicking.

enter image description here

Following the batch script:

@eacho off
net stop mariadb
if ERRORLEVEL 1 goto error
exit
:error
echo There was a problem to stop the service
pause

Please help me that How can I start and stop the service of MariaDB using batch script without run cmd under administration ?

npsingh
  • 61
  • 1
  • 7

1 Answers1

0

Stopping and starting Windows services via command line:

net stop YOURSERVICENAME
net start YOURSERVICENAME
silmaril
  • 1
  • 2
  • Thank you for replied but net command work only under administrator cmd not for user cmd mode.. – npsingh Aug 14 '19 at 01:47