Last active
February 14, 2025 03:57
-
-
Save junex/5a36b71a65686d3cd10ccb1f80c08abc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rktools.exe | |
instsrv 服务名 srvany.exe完整路径 | |
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\服务名 | |
直接在注册表中改,不需要双斜杠 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Shadowsocks\Parameters] | |
"Application"="C:\\Python27\\Scripts\\ssserver.exe" | |
"AppDirectory"="C:\\Python27\\Scripts\\" | |
"AppParameters"="-c C:\\Python27\\Scripts\\shadowsocks.json" | |
instsrv V2ray "D:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe" | |
New-Item HKLM:\SYSTEM\CurrentControlSet\Services\V2ray\Parameters | |
New-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Services\V2ray\Parameters -name Application -value "D:\\Program Files\\v2ray\\v2ray.exe" -PropertyType string | |
New-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Services\V2ray\Parameters -name AppDirectory -value "D:\\Program Files\\v2ray\\" -PropertyType string | |
New-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Services\V2ray\Parameters -name AppParameters -value "-c D:\\Program Files\\v2ray\\config.json" -PropertyType string | |
Get-Process -Name nginx | Stop-Process | |
net start nginx | |
WinSW用来配置windows服务也不错,特别是配置nginx的服务比rktools好,rtktool配置nginx无法正常停止服务 | |
WinSW配置的nginx好些,可以停止,注意sc delete服务和winsw最好在管理员权限的cmd上用,不要使用powershell | |
WinSW参考https://github.com/winsw/winsw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment