3

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.

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
Nishant Kumar
  • 463
  • 2
  • 9
  • 18

1 Answers1

6

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....

hairmot
  • 2,975
  • 1
  • 13
  • 26
  • 1
    I have searched my "C:\" drive with keywords like SVN and sc.exe but could not find the relevant file. Is something is missing from my system. – Nishant Kumar Oct 17 '16 at 08:23
  • try this path: c:\windows\system32\sc.exe sc.exe is a windows inbuilt program for managing services so it should be there. Is this your own PC or is it controlled by work? You may not have the necessary permissions to run the program – hairmot Oct 17 '16 at 08:24
  • alternatively, run cmd.exe as an administrator - hold shift and right click the cmd.exe icon to get the option. you can also try running the command cd c:\windows\system32\ before running your command – hairmot Oct 17 '16 at 08:27
  • got it thanks, it worked.. to access the repository i am using URL "svn:\\localhost\Goods\Repo" in TortoiseSVN Client but i am getting error saying the target machine actively refused it. – Nishant Kumar Oct 17 '16 at 08:32