id: fe8ecf046649406590ae29f45fe4ad86
parent_id: 
item_type: 1
item_id: f38906fbf7124fc295d2ec7f2a943fd3
item_updated_time: 1764345486638
title_diff: "[{\"diffs\":[[1,\"Windows 下 把EXE 程序变成服务运行 - alianhome的博客 - CSDN\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Windows 下 把EXE 程序变成服务运行 - alianhome的博客 - CSDN博客</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"20340\\\"></a>\\\r\\\n<h1>Windows 下 把EXE 程序变成服务运行 - alianhome的博客 - CSDN博客</h1>\\\r\\\n\\\r\\\n<div>\\\n<span><div><br/></div><div style=\\\"font-size: 16px; min-width: 100%;\\\"><div style=\\\"font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"vertical-align: baseline; font-size: 16px; text-align: left;\\\"><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"margin: 0px auto; padding: 0px 2em; border: 0px; font-size: inherit; vertical-align: baseline; z-index: 200; position: relative; width: 36em;\\\"><div style=\\\"margin: 0px 25px 0px -25px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline; position: relative;\\\"><div style=\\\"margin: 0px; padding: 0px 0px 9em; border: 0px; font-size: inherit; vertical-align: baseline; position: relative;\\\"><div style=\\\"margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline; position: relative;\\\"><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"background-color: transparent; margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><h1 style=\\\"border: 0px; vertical-align: baseline; text-align: left; font-size: 35px; padding: 0px; margin: 0px;\\\"><span style=\\\"font-size: 35px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; font-weight: normal; line-height: 35px;\\\">Windows 下 把EXE 程序变成服务运行</span></h1><div style=\\\"padding: 1.5em 0px; border: 0px; font-size: inherit; vertical-align: baseline; position: relative; height: 1em; text-align: center; margin: 0px;\\\"><div style=\\\"padding:0px;border:0px;font:inherit;vertical-align:baseline;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;opacity:0.5;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);margin:0px;margin-bottom:0px;\\\"></div></div></div><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">因为使用了FRP搭建了内网穿透服务 所以内网和外网的cmd 程序 就想变成服务来运行</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">1. 下载  instsrv.exe 和 srvany.exe   我下载的地址  [</span><a href=\\\"https://www.cr173.com/soft/64394.html\\\" style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline; color: rgb(6, 85, 136); font-family: &quot;PT Serif&quot;; line-height: 1.5em; text-decoration: none;\\\" target=\\\"_blank\\\">点击打开链接</a><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">][</span><span style=\\\"font-size: 12pt; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;;\\\"> </span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">2. cmd  cd  到 解压目录 </span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">              cd c:\\\\srvany</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">3. 命令  instsrv.exe 你的服务名 [srvany.exe] 所在的目录</span></div><div style=\\\"margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">            <span style=\\\"background-color: rgb(255, 250, 165); font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;-evernote-highlight:true;\\\">instsrv.exe ServerName C:\\\\program\\\\srvany\\\\srvany.exe</span></span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">4. 打开注册表 </span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">            路径：HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\ 找到你刚才输入的服务名</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">5. 在下面新建项：Parameters</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">6. 在Parameters 下新建字符串值：  名称为： Application     值: exe 所在的全路径 包含exe  如果有参数  一起写上 写在后面</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">7. 在Parameters 下新建字符串值：  名称为： AppDirectory  值: exe 所在的路径 不包含 只要路径</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">8. 打开服务控制面板</span></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">9. 找到自己刚才所创建的服务名  控制相关属性 就行了 可以启动试一试</span></div><div style=\\\"margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">10. <span style=\\\"background-color: rgb(255, 250, 165); font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;-evernote-highlight:true;\\\">如果想删除服务  cd 到instsrv.exe 所在目录  然后 执行 instsrv.exe ServerName remove  就好了 </span></span></div></div></div></div></div></div></div><div style=\\\"background-color: transparent; margin: 0px 0px 1.5em; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline; position: absolute; top: -1000px; left: -1000px;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1.5em;\\\">Measure</span></div><div style=\\\"background-color: transparent; margin: 0px; padding: 0px; border: 0px; font-size: inherit; vertical-align: baseline; position: absolute; top: -1000px; left: -1000px;\\\"><span style=\\\"font-size: 16px; color: rgb(31, 9, 9); font-family: &quot;PT Serif&quot;; line-height: 1;\\\">Measure</span></div></div></div></div></div></div></div></div><div><br/></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":8530}]"
metadata_diff: {"new":{"id":"f38906fbf7124fc295d2ec7f2a943fd3","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345771857,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:13:02.224Z
created_time: 2025-11-28T16:13:02.224Z
type_: 13