0

I know that I can either use

sc start Tomcat6

or

net start Tomcat6

to start the tomcat service, however I get an error "Access is denied". How can I achieve restarting the tomcat service via command prompt and overcoming the error? Thanks

dido
  • 3,347
  • 11
  • 34
  • 42

1 Answers1

1

If you are on Windows Server 2008 or above (R2), you need to run your command prompt as administrator. Create a desktop shortcut to "cmd" or c:\windows\system32\cmd.exe. Then right-click the shortcut and "run as administrator".

tgolisch
  • 6,549
  • 3
  • 24
  • 42
  • +1 but you could just type cmd in the search bar and run as admin, save creating a shortcut :) – Bali C Jan 04 '13 at 16:51
  • well i don't want to create a shortcut though. i want to do it via command line – dido Jan 04 '13 at 18:52
  • The shortcut instructions (above) are only an example of one way of doing this. The point is mainly that you need to [run as an administrator]. As Bali C pointed out, you could do this from the search bar, or find Cmd in your start menu (and [right-click], run as admin) or if you are doing a scheduled process, make sure it is running as admin. – tgolisch Jan 07 '13 at 15:10