Solved .batch file to restart SQL server

tys

New member
Member
Local time
7:52 PM
Messages
38
Hi all,

I have a simple but effective way of restarting our SQL server from .bat file. this works from my computer. But from other Windows 7 it doesn't.

It comes up with .<5> access if denied.

I'm guessing it is something to with permissions. I've tried adding the users as administrators, but still not working.Even given them same permissions I have on my laptop and still no luck.

Please,
any help?!

thanks!
 

My Computer

OS
Windows 7 Professional x64
For users for future reference. You need to enable the users that are going to be using the batch file to have access to the computer you're going to be shutting down and for them to have administrative rights on that computer aswell.
 

My Computer

OS
Windows 7 Professional x64
Most likely it's due to UAC, as it "converts" admins to non-admins under the hood (and restarting services require administrator privileges).
Try running the file with right click => run as administrator.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Back
Top