'sc' is not recognized as an internal or external command

Nishant Kumar picture Nishant Kumar · Oct 17, 2016 · Viewed 14.9k times · Source

I am trying to create a svnserver using cmd after i changed svnserve.conf by uncommenting the following lines in the file,

anon-access = read
auth-access = write

command execute in cmd is,

sc create svnserver binpath= "C:\Program Files\TortoiseSVN\bin\svnserve.exe --service -r c:\Goods\Repo" DisplayName= "Subversion" depend= tcpip start= auto

but i am getting error

'sc' is not recognized as an internal or external command

I am not sure what i am doing wrong. I have installed tortoise SVN Client and Visual SVN Server. Can someone please let me know what i am missing here.

Answer

hairmot picture hairmot · Oct 17, 2016

you will need to add the path to sc.exe ("c:\windows\system32\") in your Path environment variable. Do this by hitting windows key + Pause|Break then selecting advanced system settings - environment variables is at the bottom. Just add an extra entry after the last - separated by semi-colons. If this isn't possible, simply give the command the full path of sc.exe e.g.

"c:\windows\system32\sc.exe" create svnserver....