目录
WinSW
* WinSW(Windows Service Wrapper)是一个开源项目,它可以让我们快速把一个可执行的程序注册为Windows的系统服务。
* 可以使得程序可以自启动,或者是可以关闭cmd窗口后保持运行。
环境
- Windows系统:Win11
- 系统自带的服务控制:services.msc
- -
- -
- 如果找不到的话可以通过运行窗口调用起来
- 首先按 win + r 调出运行窗口
- 然后输入 services.msc ,回车
- -
- WinSW
- 版本:v3.0.0
- github地址:https://github.com/winsw/winsw
使用方法
- 下载WinSW
- 复制 WinSW-x64.exe 到想要注册为服务的程序所在目录。
- 这里以注册nginx为例:
- 记住你下载的WinSW的名字,比如我的是WinSW.exe,那就新建一个同名的WinSW.xml.
- 当然你可以修改程序的名字,比如改为hello.exe,那就要新建一个同名的hello.xml.
- 直接在当前目录下右键新建文本文件
- -
- 写入如下内容
- 分析(仅说明需要修改的地方):
- 具体见相关外链:winsw配置文件参数解释说明 - 安夜的cookie
- <id>:指定Windows内部用户标识服务的id;在系统安装的所有服务中id必须是唯一的,并且完全由字母数字字符组成。
- <name>:服务的简短显示名称,可以包含空格和其他字符;在系统的所有服务中name也必须是唯一的。
- <description>:对服务的完整描述。
- <executable>:指定要启动的可执行文件,可以是绝对路径,也可以只指定可执行文件名称并从PATH中搜索。
- <startargument>启动时的传递参数
- <stopargument>停止时的传递参数
- 一般修改<id> <name> <description> 都写为服务名就可以了。
- <executable>写exe程序所在的路径,且路径尾部包含程序名
- <logpath>写exe程序所在路径即可
- <startargument>一般改成程序的路径,后面添加对应的程序启动的命令
- 比如frps一般的启动命令是frps -s frps.ini
- 这样的话这里就可以在路径后面增加 -s D:\frp\frps.ini
- 注意所有文件路径最好都用绝对路径
- <stopargument>一般改成程序路径,并且后面的-s stop改为对应的程序停止的命令
- 同<startargument>的写法。
<?xml version="1.0" encoding="UTF-8" ?>
<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<executable>D:\0Acoolight\App\nginx\nginx-1.20.2\nginx.exe</executable>
<logpath>D:\0Acoolight\App\nginx\nginx-1.20.2\</logpath>
<logmode>roll</logmode>
<depend></depend>
<startargument>-p D:\0Acoolight\App\nginx\nginx-1.20.2</startargument>
<stopargument>-p D:\0Acoolight\App\nginx\nginx-1.20.2 -s stop</stopargument>
</service>
- -
- 把文本文件另存为xml文件,如果不另存为的话,其后缀仍是txt
- 在当前目录下启动cmd。
- 安装服务,在cmd中输入以下命令并回车执行:
- WinSW-x64.exe install
- 至此,系统的服务管理中已经会有nginx这个服务了
- 调出服务管理的方法参见本文开头
调整服务为自启动
- 选中nginx服务项
- 右键,然后点击属性
- 如图,启动类型选择自动,并保存即可。
手动启动服务
- 如果服务没有启动,可以手动启动一下它
- 在服务管理中选中nginx,然后右键,点击 “启动” 即可。
https://clomiddelivery.pro/# order cheap clomid pills
https://ciprodelivery.pro/# cipro for sale
doxycycline 100 mg capsule: doxycycline capsules india – canadian pharmacy doxycycline
This excellent website certainly has all of the information I wanted about this subject and didn’t know who to ask.
ciprofloxacin 500mg buy online: ciprofloxacin – ciprofloxacin 500 mg tablet price
Having read this I believed it was very informative. I appreciate you spending some time and energy to put this information together. I once again find myself spending a lot of time both reading and leaving comments. But so what, it was still worthwhile.
Добрый день!
Как приобрести диплом техникума с минимальными рисками.
Заказать диплом любого ВУЗа.
http://www.djjmeets.com/blogs/179423/%D0%9B%D0%B5%D0%B3%D0%BA%D0%BE-%D0%BF%D1%80%D0%B8%D0%BE%D0%B1%D1%80%D0%B5%D1%82%D0%B0%D0%B5%D0%BC-%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B-%D0%B2-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D0%B5-Russian-Diplom
Официальная покупка диплома вуза с сокращенной программой в Москве
ast-diploms24.ru/kupit-diplom-moskva
http://paxloviddelivery.pro/# Paxlovid over the counter
https://paxloviddelivery.pro/# paxlovid india
Привет, друзья!
Мы предлагаем документы техникумов, которые находятся в любом регионе России. Можно приобрести качественно сделанный диплом от любого учебного заведения, за любой год, включая сюда документы старого образца СССР. Документы выпускаются на бумаге самого высшего качества. Это позволяет делать настоящие дипломы, не отличимые от оригинала. Документы будут заверены всеми обязательными печатями и подписями.
http://www.luckybookies.com/blogs/1119/%D0%94%D0%B5%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5-%D0%BE%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80%D0%B8%D0%BE%D0%B1%D1%80%D0%B5%D1%82%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B4%D0%B8%D0%BF%D0%BB%D0%BE%D0%BC%D0%B0-%D0%B2-%D0%B7%D0%BD%D0%B0%D0%BC%D0%B5%D0%BD%D0%B8%D1%82%D0%BE%D0%BC-%D0%BE%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D0%B5
Привет, друзья!
Купить диплом о высшем образовании.
2016.goodboard.ru/viewtopic.php?id=204#p1443
Удачи!
Здравствуйте!
Мы готовы предложить дипломы любой профессии по приятным тарифам.
transad-advertising.com/купить-приложение-к-диплому/
Hi there! This article could not be written any better! Looking through this post reminds me of my previous roommate! He continually kept talking about this. I am going to forward this post to him. Fairly certain he’ll have a great read. Thank you for sharing!
Manny Pacquiao https://filipino-boxer.manny-pacquiao-ar.com is one of the most prominent boxers in the history of the sport.
Muhammad Ali https://american-boxer.muhammad-ali-ar.com is perhaps one of the most famous and greatest athletes in the history of boxing.
Здравствуйте!
Можно ли купить аттестат о среднем образовании, основные моменты и вопросы
mizunosoccershoesfans.com/read-blog/3329_gramotno-zakazyvaem-dokumenty-v-internete-avtorskij-obzor.html?mode=night
Mike Tyson https://american-boxer.mike-tyson-ar.com one of the most famous and influential boxers in history, was born on June 30, 1966 in Brooklyn, New York.
Привет, друзья!
Где заказать диплом по актуальной специальности?
postgresconf.org/users/jerome-farmer
Привет, друзья!
Мы можем предложить документы ВУЗов, которые находятся в любом регионе РФ. Можно купить качественный диплом за любой год, включая сюда документы СССР. Дипломы и аттестаты выпускаются на “правильной” бумаге высшего качества. Это дает возможности делать настоящие дипломы, не отличимые от оригиналов. Документы будут заверены всеми обязательными печатями и штампами.
orqut.com//blogs/10168/%D0%9A%D0%B0%D0%BA-%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE-%D0%BD%D0%B5%D0%B4%D0%BE%D1%80%D0%BE%D0%B3%D0%BE-%D0%BA%D1%83%D0%BF%D0%B8%D1%82%D1%8C-%D0%B0%D1%82%D1%82%D0%B5%D1%81%D1%82%D0%B0%D1%82-%D0%B2-%D0%BE%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D0%B5
лучшее порево онлайн besplatny-sex-online.ru .
enterprise car rental Montenegro https://montenegro-car-rental-hire.com
doxycycline cream: doxycycline 75 mg coupon – order doxycycline no prescription
https://clomiddelivery.pro/# where can i get cheap clomid pill
Привет!
Процесс получения диплома стоматолога: реально ли это сделать быстро?
arusak-diploms-srednee.ru/kupit-diplom-v-krasnoiarske
Добрый день!
Заказать документ о получении высшего образования
asxdiplomik.com/kupit-diplom-o-srednem-obrazovanii
Добрый день!
Всё, что нужно знать о покупке аттестата о среднем образовании.
Приобрести диплом университета.
4yyes7rjw.blogsidea.com/34455898/%D0%94%D0%B5%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5-%D0%BE%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80%D0%B8%D0%BE%D0%B1%D1%80%D0%B5%D1%82%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B0%D1%82%D1%82%D0%B5%D1%81%D1%82%D0%B0%D1%82%D0%B0-%D0%B2-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D0%B5
Привет, друзья!
Всё, что нужно знать о покупке аттестата о среднем образовании без рисков
odinzovo.rusff.me/viewtopic.php?id=4869#p8228
Всегда вам поможем!
купить диплом в нальчике diploms-x.com .
casino
https://ciprodelivery.pro/# ciprofloxacin order online
can i order cheap clomid without rx: generic clomid without prescription – where to buy cheap clomid without prescription
Spot on with this write-up, I actually think this amazing site needs much more attention. I’ll probably be returning to see more, thanks for the info!
https://ciprodelivery.pro/# ciprofloxacin generic
http://ciprodelivery.pro/# cipro
Здравствуйте!
Заказать диплом о высшем образовании.
vocal.com.ua/node/62301
Как официально приобрести аттестат 11 класса с минимальными затратами времени
ast-diplomas.com/kupit-diplom-o-srednem-obrazovanii
Здравствуйте!
Приобретение диплома ВУЗа с сокращенной программой обучения в Москве
newnormalnetwork.me/create-blog
Всегда вам поможем!
https://paxloviddelivery.pro/# buy paxlovid online
Привет, друзья!
Где приобрести диплом по нужной специальности?
Купить диплом о высшем образовании.
formfinance.ru/legkiy-sposob-poluchit-diplom-lyuboy-professii
Michael Jordan https://chicago-bulls.michael-jordan-ar.com is one of the greatest basketball players of all time, whose career with the Chicago Bulls is legendary.
Привет!
Рекомендации по безопасной покупке диплома о высшем образовании
smol-sport22.ru/index.php?subaction=userinfo&user=ajivus
Будем рады вам помочь!.
спальня дизайн интерьера https://dizayn-interera-doma.ru
get cheap clomid without a prescription: where to buy cheap clomid without insurance – where can i buy cheap clomid
The Formula One World Championship https://world-circuit-racing-championship.formula-1-ar.com, known as the Formula Championship in motor racing, is the highest tier of professional motor racing.
After some difficult years in the late 2010s, Manchester United https://england.manchester-united-ar.com returned to greatness in English football by 2024.
Добрый день!
Купить документ о получении высшего образования можно в нашем сервисе.
ast-diplomas24.ru/kupit-diplom-nizhnij-novgorod
Успехов в учебе!
https://amoxildelivery.pro/# purchase amoxicillin 500 mg
Добрый день!
Приобрести диплом о высшем образовании.
c99596qr.beget.tech/2024/07/04/kak-podyskat-nadezhnyy-onlayn-magazin-s-obshirnym-vyborom-diplomov.html
лучшее порево лучшее порево .