sc create command is not working

2,861 views
Skip to first unread message

Sudarshan Panke

unread,
Feb 15, 2017, 5:51:47 AM2/15/17
to dedupfilesystem-sdfs-user-discuss
Hi, I am using following command to run,

mksdfs --volume-name=sdfs_vol1 --volume-capacity=50GB

mountsdfs -v sdfs_vol1 -m E

above two commands run successfully but below command is not working.

sc create sdfse binPath="\"C:\Program Files\sdfs\mountsdfs.exe\" -v sdfs_vol1 -m E -cp" DisplayName="SDFS E Drive" start=auto

It's saying

PS C:\Windows\system32> sc create sdfse binPath="\"C:\Program Files\sdfs\mountsdfs.exe\" -v sdfs -m e -cp" DisplayName=" SDFS E Drive" start=auto Set-Content : A positional parameter cannot be found that accepts argument 'binPath=\C:\Program'. At line:1 char:1 + sc create sdfse binPath="\"C:\Program Files\sdfs\mountsdfs.exe\" -v s ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Set-Content], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetContentCommand

Th. Klein

unread,
Mar 2, 2017, 5:45:36 AM3/2/17
to dedupfilesystem-sdfs-user-discuss
Hi Sudarshan,

I suppose the quoting is wrong in the example found on the web site.

Can you try this line instead:
SC CREATE sdfsE binPath="C:\Program Files\sdfs\mountsdfs.exe -v sdfs_vol1 -m E -cp" DisplayName="SDFS E Drive" start=auto

Please give feedback if this works OK, because then we should notify odd's webmaster asking for change!

Kind regards,
Thomas

Carl Appellof

unread,
Mar 2, 2017, 6:25:16 PM3/2/17
to dedupfilesystem-sdfs-user-discuss
The syntax for the Windows "sc" command is weird.  you must add a space after the "binpath= " option as well as all the others.
Try this:

sc create sdfse binPath= "\"C:\Program Files\sdfs\mountsdfs.exe\" -v sdfs_vol1 -m E -cp" DisplayName= "SDFS E Drive" start= auto

Reply all
Reply to author
Forward
0 new messages