http://www.cnblogs.com/jans2002/archive/2007/11/15/959879.html
sample:
sc create WSTEST binpath= C:\Applications\WSTEST.exe displayname= WSTEST depend= Tcpip start= auto type= share
•如果参数及其值之间没有空格,(例如,是 type= own,而不是 type=own),则操作会失败。
[SC] OpenSCManager FAILED 5
1. Click Start and type CMD in the Start search box
2. Right click on CMD in the list and click on "Run as administrator"