目录
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,然后右键,点击 “启动” 即可。
mexican drugstore online mexican pharmaceuticals online buying prescription drugs in mexico online
Привет, друзья!
Заказать диплом о высшем образовании.
sonnick84.newbigblog.com/34132577/%D0%9D%D0%B0-%D1%87%D1%82%D0%BE-%D0%B8%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE-%D0%B2%D0%BD%D0%B8%D0%BC%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BE%D0%B1%D1%80%D0%B0%D1%89%D0%B0%D1%82%D1%8C-%D0%BF%D1%80%D0%B8-%D0%B7%D0%B0%D0%BA%D0%B0%D0%B7%D0%B5-%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%BE%D0%B2-%D0%B2-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82%D0%B5
mexican rx online: mexican drugstore online – mexico pharmacies prescription drugs
лучшие игры на android 2024 http://android-games-download.ru .
pharmacies in mexico that ship to usa: best online pharmacies in mexico – best online pharmacies in mexico
medicine in mexico pharmacies: buying prescription drugs in mexico – reputable mexican pharmacies online
mexican pharmaceuticals online: medication from mexico pharmacy – mexico drug stores pharmacies
reputable mexican pharmacies online mexico drug stores pharmacies medication from mexico pharmacy
Привет!
Купить документ университета вы сможете в нашем сервисе.
ast-diploms.com/kupit-diplom-rostov-na-donu
Успехов в учебе!
purple pharmacy mexico price list п»їbest mexican online pharmacies buying from online mexican pharmacy
pharmacies in mexico that ship to usa: п»їbest mexican online pharmacies – mexican drugstore online
Very practical content, and you are welcome to visit my website! https://miauk.com/
pharmacies in mexico that ship to usa: mexican online pharmacies prescription drugs – medicine in mexico pharmacies
mexican mail order pharmacies mexican online pharmacies prescription drugs buying prescription drugs in mexico
mexico drug stores pharmacies medication from mexico pharmacy mexico drug stores pharmacies
п»їbest mexican online pharmacies: medication from mexico pharmacy – best online pharmacies in mexico
Здравствуйте!
Мы можем предложить дипломы психологов, юристов, экономистов и прочих профессий по приятным тарифам.
standart-rzn.ru/kvartiry-i-mkd/vychet-na-pokupku-doma-s-uchastkom
mexican mail order pharmacies: best online pharmacies in mexico – п»їbest mexican online pharmacies
Привет!
Купить документ университета можно у нас в Москве.
diplomyx.com/kupit-diplom-krasnoyarsk
Хорошей учебы!
mexican online pharmacies prescription drugs mexican pharmacy best online pharmacies in mexico
Добрый день!
Как безопасно купить диплом колледжа или ПТУ в России, что важно знать
yacina.net/купить-диплом-о-высшем-образовании-ре
Рады оказать помощь!.
mexican pharmaceuticals online: mexican online pharmacies prescription drugs – mexican drugstore online
п»їbest mexican online pharmacies: buying from online mexican pharmacy – reputable mexican pharmacies online
mexican online pharmacies prescription drugs: mexican border pharmacies shipping to usa – mexico pharmacies prescription drugs
mexican online pharmacies prescription drugs: mexican pharmaceuticals online – mexican border pharmacies shipping to usa
buying prescription drugs in mexico: mexico drug stores pharmacies – buying prescription drugs in mexico online
best online pharmacies in mexico: mexican mail order pharmacies – mexican online pharmacies prescription drugs
Добрый день!
Заказать диплом любого университета.
alex-neil.ru/index.php/cb-profile/pluginclass/cbblogs?action=blogs&func=show&id=233
mexican border pharmacies shipping to usa mexico drug stores pharmacies mexican border pharmacies shipping to usa
mexico drug stores pharmacies medicine in mexico pharmacies mexican border pharmacies shipping to usa
Привет!
Полезная информация как официально купить диплом о высшем образовании
mans-diplomas.ru
Привет!
Приобрести диплом о высшем образовании.
upuge.com/read-blog/31709_osnovnye-zatraty-sovremennogo-izgotovitelya-dokumentov-obzor.html
Здравствуйте!
Мы готовы предложить дипломы любой профессии по доступным ценам.
lgzprojects.co.za/2024/06/30/куплю-диплом-рф
pharmacies in mexico that ship to usa: mexican border pharmacies shipping to usa – mexico drug stores pharmacies
best online pharmacies in mexico: buying prescription drugs in mexico – medication from mexico pharmacy
seo аудит цена https://www.prodvizhenie-sajtov15.ru .
mexican pharmaceuticals online: best online pharmacies in mexico – mexican pharmaceuticals online
buying prescription drugs in mexico: mexico drug stores pharmacies – mexico pharmacies prescription drugs
mexican online pharmacies prescription drugs medication from mexico pharmacy buying prescription drugs in mexico online
Opt in or out of the Apple News Newsletter under Email from Apple News. Microsoft won’t renew the contracts for dozens of news production contractors working at MSN and plans to use artificial intelligence to replace them, several people close to the situation confirmed on Friday. Still, overall it is great to see MSN News get the black treatment, which works much better for night time reading. If you’re not on any of the Insider rings you can take a peek at these screenshots to see what full dark mode is like. According to the iOS app’s privacy label, the data being used to track users across websites and apps owned by other companies includes the User ID. By comparison, Google News does not include a tracking section. Both Microsoft Start and Google News collect a host of “data linked to you,” like location, identifiers, search history, usage data, contact info, and more. The website itself, however, only links to Microsoft’s general privacy policy.
https://robotech.com/forums/viewthread/2223384
Support Local Green News Subscribe to our newsletter Interested in more stories about Dallas Fort Worth International Airport? Log in and start following the topic to get the latest… Get hyperlocal forecasts, radar and weather alerts. Texas Gov. Greg Abbott warned Thursday, “We are dealing with one of the most significant icing events … in at least several decades.” Over 150 students and community members gathered at the University of Texas at Arlington and Globe Life Field to protest the ongoing war in Gaza. Interested in more stories about Dallas Fort Worth International Airport? Log in and start following the topic to get the latest… WDIV brings the ‘cube’ from Houston sister station to Detroit Supporters say motorists have a choice between driving on toll lanes or free roads, but critics say it’s not about choice, it’s about affordability.
best online pharmacies in mexico buying from online mexican pharmacy mexican border pharmacies shipping to usa
This is a good affecting look at this specific point. I am delighted you discussed your views as well as knowledge and I discovered that i believe I agree. I truly respect the very clear writing additionally , the effort and hard work you’ve you spend writing this post. Loads of thanks yous for that decent work and good luck with the site, I am looking forward to updates within the future.
medication from mexico pharmacy: pharmacies in mexico that ship to usa – п»їbest mexican online pharmacies
buying prescription drugs in mexico mexican mail order pharmacies mexico pharmacy
mexico drug stores pharmacies: mexican rx online – mexico drug stores pharmacies
medicine in mexico pharmacies mexican mail order pharmacies mexico drug stores pharmacies
Здравствуйте!
Как официально купить аттестат 11 класса с упрощенным обучением в Москве
mandiplomiks.ru
mexican drugstore online: best online pharmacies in mexico – pharmacies in mexico that ship to usa
Привет, друзья!
Купить документ о получении высшего образования можно в нашей компании в столице.
diplomyx.com/kupit-diplom-perm
mexican online pharmacies prescription drugs medication from mexico pharmacy reputable mexican pharmacies online