SC命令创建服务:
sc create Apache2.2 binPath= "D:\gzdc\apache_2_2_23\bin\httpd.exe -k runservice" displayname= "Apache2.2" start= auto depend= Tcpip
sc description Apache2.2 "Apache/2.2.23 (Win64)"sc start Apache2.2
sc delete Apache2.2
Apache自带的httpd创建服务:
httpd -k install -n "Apache2.2" -f "D:\gzdc\apache_2_2_23\conf\httpd.conf"
[sc] openSCManager 失败 5 拒绝 访问拒绝