将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的服务 ...
随机推荐
- Projected Coordinate Systems
Coordinate Systems Projected Coordinate Systems This is an archive of a previous version of the ArcG ...
- php 批量生成html,txt文件的方法(实例代码)
php批量生成html,txt文件的实现代码. 首先,建立一个conn.php 链接数据库. <?php $link = mysql_connect("mysql_host" ...
- php curl 伪造IP来源的代码分享
php curl 可以模仿用户登录,还可以模仿用户IP地址.伪造IP来源. 1,curl发出请求的文件fake_ip.php: <?php $ch = curl_init(); $url = & ...
- DrawWindowFrame
extern void DrawWindowFrame(HWND hWnd)//画窗口边框 { RECT rc; HWND DeskHwnd = ::GetDesktopWindow(); //取得桌 ...
- C语言的32个关键字
由ANSI标准定义的C语言关键字共个: auto double int struct break else long switch case enum register typedef char ex ...
- FFT Golang 实现
最近项目要用到快速傅立叶变换,自己写了个算法,测试了下,性能和精度还可以接受 len,time= 1048576 378.186167ms diff=-0.00000000000225974794 I ...
- IOS game
App Store真是个金矿,即使是红海一片,黑马也依旧不少,前有愤怒的小鸟,现在出了个Flappy Bird,虽然是去年推出的,但最近爆红App Store和Google Play,越南河内的独立游 ...
- EXTJS 4.2 资料 控件之 xtype: "fieldcontainer",追加html
{ xtype: "fieldcontainer", layout: "hbox", items: [ { fieldLabel: '素材目录', name: ...
- Android模拟神器Genymotion eclipse插件安装问题出解决
我之前一直是打开eclipse之前直接运行Genymotion模拟器就可以连接到adb了,非常方便,但最近突然想来装个eclipse的Genymotion插件玩玩,安装时居然出错了,于是不折腾好心里不 ...
- Xcode8 重新配置 CocoaPods -替换阿里源
一.CocoaPods是什么? CocoaPods是一个负责管理iOS项目中第三方开源库的工具.CocoaPods的项目源码在Github上管理.该项目开始于2011年8月12日,在这两年多的时间里, ...