- windows 把bat轉爲服務
1.1)
E:\selfstart\instsrv.exe selfcassandra E:\selfstart\srvany.exe
E:\selfstart\instsrv.exe selfpiweb E:\selfstart\srvany.exe
1.2)
在註冊表中找到剛纔建的相
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/selfcassandra
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/selfpiweb
在這兩個下面建項 Parameters
在Parameters中建立2個字符串的字符串值AppDirectory 和 Application
其中AppDirectory是bat所在目錄 E:\selfstart
Application是bat E:\selfstart\selfpiweb.bat
selfcassandra.bat
@echo off
F:
cd apache-cassandra-2.0.14
cd bin
cassandra
selfpiweb.bat
@echo off
@ping 127.0.0.1 -n 60 >nul
F:
cd pi-webclaa-1.0.0
cd bin
start.bat
刪除服務
e:
E:\selfstart\instsrv.exe selfpiweb remove