将OutLook.exe注册为服务,让其一直保持开启状态
1.将OutLook.exe注册为服务,让其一直保持开启状态
类似于TaobaoProtect.exe是由TBSecSvc服务启动的
http://stackoverflow.com/questions/3582108/create-windows-service-from-executable#
You can use sc.exe (required when using Powershell):
sc create <new_service_name> binPath= "<path_to_the_executable>"
(must have quotation marks around the actual exe path)
More info is available from Microsoft KB.
需要注意的是binPath=后面有一个空格,千万不要漏掉。
C:\Windows\System32>sc create OutLook binPath= "C:\Program Files (x86)\Microsoft
Office\Office12\OUTLOOK.EXE"
[SC] CreateService 成功
控制面板-->管理工具-->服务
找到刚才新建的服务,设置启动类型为自动
启动服务的时候,一直提示Error 1053
貌似需要exe本身支持服务才可以
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686953(v=vs.85).aspx
http://stackoverflow.com/questions/8972679/windows-7-bat-file-not-starting-as-a-service
You get the first error because your batch file is unable to negotiate/interact with the Windows Services subsystem. When Windows starts a Service, the OS waits a few seconds for the Service to report that is has started properly. If this signal never arrives (as with your batch file, which doesn't know anything about Services), Windows will report error #1053.
You will need a "wrapper" application to run your batch file as a service. The free "SRVANY" utility from Microsoft may work for you but you should investigate the more fully-featured commercial alternatives as well.
============
做了个bat脚本,比较麻烦
cd "C:\Program Files (x86)\Microsoft Office\Office12"
OutLook.exe
exit
2.使用第三方的插件
https://superuser.com/questions/189905/how-to-make-outlook-2010-minimize-when-i-try-to-close-it
outlook2010测试失败
将OutLook.exe注册为服务,让其一直保持开启状态的更多相关文章
- 如何将exe注册为windows服务,直接从后台运行
方法一:使用windows自带的命令sc 使用sc create 方法创建. 如:注册服务 sc create ResharperServices binpath= D:\ResharperServi ...
- Windows Server下把BAT批处理注册成服务在后台运行且注销后能正常运行
批处理有如下特点: 1.登录到当前窗口运行时,如果关闭控制台会连同启动的程序一起关闭. 2.如果是以start /b的形式启动,那么同样也是在控制台关闭后者注销当前窗口也会一起关闭. 3.如果以vbs ...
- 把应用程序exe 注册成为windows 服务的方法
由于在Windows 服务器上必须要启动一个软件,提供外网访问内网的客户端软件,但是由于每次远程服务器之后会注销当前用户,所以客户端软件就会自动退出,那么我在外网的系统就不能支持访问了. 解决方案:将 ...
- 把exe注册为windows服务
1.需要工具 Instsrv.exe(可以给系统安装和删除服务) Srvany.exe(可以让程序以服务的方式运行) 2.运行cmd,输入注册服务命令 "instsrv.exe完整路径&qu ...
- Nginx的使用(三)把nginx和php-cgi.exe注册成windows服务
1.创建windows服务用到一个小工具WinSW:https://github.com/kohsuke/winsw/releases(下载 .exe 文件即可,根据系统选择,Win 10 选择 .N ...
- 怎样把exe程序注册成系统服务
怎样把exe程序注册成系统服务 最近一段时间我们公司开发一款新的产品,要在服务器上运行一个服务端程序,为了方便我就希望能将这个程序注册成系统服务开机自动启动而不用每次重启系统都要手动启动程序.要实现这 ...
- 在64位windows下使用instsrv.exe和srvany.exe创建windows服务[转]
本文转自:https://www.iflym.com/index.php/computer-use/201205020001.html 在32位的windows下,包括windows7,windows ...
- 在64位windows下使用instsrv.exe和srvany.exe创建windows服务
在64位windows下使用instsrv.exe和srvany.exe创建windows服务 在32位的windows下,包括windows7,windows xp以及windows 2003, ...
- nginx 注册为服务
使用java service wrapper将java程序注册为windows服务 分类:Java (5677) (8) 将java注册为windows服务后,我们就直接可以通过windows的服务 ...
随机推荐
- CR0,CR3寄存器
驱动在hook系统函数的时候通常要将只读属性暂时的屏蔽掉,主要有三种方法 1.修改CR0寄存器的WP位,使只读属性失效(这是网上用的最多的方法),切忌使用完之后立马修改回来 2.只读的虚拟地址,通过C ...
- Beaglebone Back学习五(PWM测试)
PWM测试 参考链接 1 Enable PWM on BeagleBone with Device Tree overlays 2Using PWM on the Beaglebone Black 3 ...
- WPF中利用DynamicDataDisplay快速实现示波器功能
DynamicDataDisplay控件是一个功能很强的绘图工具,除了能生成曲线外,还有很多其他功能,具体见http://dynamicdatadisplay.codeplex.com/.这里你也能下 ...
- Android的ProgressBar以及自定义进度条
1.xml文件 activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an ...
- Java实现mysql数据库备份
Runtime是一个与JVM运行时环境有关的类,这个类是Singleton的. Runtime.getRuntime()可以取得当前JVM的运行时环境,这也是在Java中唯一一个得到运行时环境的方法. ...
- Kinetic使用注意点--circle
new Circle(config) 参数: config:包含所有配置项的对象. { radius: "半径", fill: "填充色", fillRGB: ...
- hadoop可能遇到的问题
1.hadoop运行的原理? 2.mapreduce的原理? 3.HDFS存储的机制? 4.举一个简单的例子说明mapreduce是怎么来运行的 ? 5.面试的人给你出一些问题,让你用mapreduc ...
- 我的PHP之旅--XML初步
什么是XML? XML是可拓展标记语言,它和XHTML很像.但它和XHTML的目的性不一样,XHTML负责展示数据,而XML负责保存或交换传输数据. 而且XML可拓展,它没有固定的标签.它的标签可以自 ...
- C# SqlConnection
public static ArrayList Connect(string connectionString, string commandText) { ArrayList retValList ...
- Javascript字典操作
<script type="text/javascript"> var dic = new Array(); //注意它的类型是Array ...