首先需要兩個(gè)工具 srvany.exe 和 instsrv.exe
使用 instsrv 服務(wù)名稱 srvany.exe絕對路徑
修改注冊表
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\服務(wù)名稱\Parameters]
"Application"="值為你要作為服務(wù)運(yùn)行的程序地址"
"AppDirectory"="值為你要作為服務(wù)運(yùn)行的程序所在文件夾路徑"
"AppParameters"="值為你要作為服務(wù)運(yùn)行的程序啟動(dòng)所需要的參數(shù)"
notepad 安裝成服務(wù)啟動(dòng)示例
instsrv sample1 C:\Windows\System32\srvany.exe
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sample1\Parameters]
"Application"="C:\\WINDOWS\\SYSTEM32\\notepad.exe"
"AppDirectory"="C:\\WINDOWS\\SYSTEM32\\"
"AppParameters"=""
關(guān)于instsrv.exe和srvany.exe更詳情的介紹和用法 http://wangye.org/blog/archives/42/
使用 instsrv 服務(wù)名稱 srvany.exe絕對路徑
修改注冊表






notepad 安裝成服務(wù)啟動(dòng)示例
instsrv sample1 C:\Windows\System32\srvany.exe






關(guān)于instsrv.exe和srvany.exe更詳情的介紹和用法 http://wangye.org/blog/archives/42/