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本身支持服务才可以

http://stackoverflow.com/questions/12560727/trouble-with-running-myprogram-exe-as-service-on-windows-2008

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注册为服务,让其一直保持开启状态的更多相关文章

  1. 如何将exe注册为windows服务,直接从后台运行

    方法一:使用windows自带的命令sc 使用sc create 方法创建. 如:注册服务 sc create ResharperServices binpath= D:\ResharperServi ...

  2. Windows Server下把BAT批处理注册成服务在后台运行且注销后能正常运行

    批处理有如下特点: 1.登录到当前窗口运行时,如果关闭控制台会连同启动的程序一起关闭. 2.如果是以start /b的形式启动,那么同样也是在控制台关闭后者注销当前窗口也会一起关闭. 3.如果以vbs ...

  3. 把应用程序exe 注册成为windows 服务的方法

    由于在Windows 服务器上必须要启动一个软件,提供外网访问内网的客户端软件,但是由于每次远程服务器之后会注销当前用户,所以客户端软件就会自动退出,那么我在外网的系统就不能支持访问了. 解决方案:将 ...

  4. 把exe注册为windows服务

    1.需要工具 Instsrv.exe(可以给系统安装和删除服务) Srvany.exe(可以让程序以服务的方式运行) 2.运行cmd,输入注册服务命令 "instsrv.exe完整路径&qu ...

  5. Nginx的使用(三)把nginx和php-cgi.exe注册成windows服务

    1.创建windows服务用到一个小工具WinSW:https://github.com/kohsuke/winsw/releases(下载 .exe 文件即可,根据系统选择,Win 10 选择 .N ...

  6. 怎样把exe程序注册成系统服务

    怎样把exe程序注册成系统服务 最近一段时间我们公司开发一款新的产品,要在服务器上运行一个服务端程序,为了方便我就希望能将这个程序注册成系统服务开机自动启动而不用每次重启系统都要手动启动程序.要实现这 ...

  7. 在64位windows下使用instsrv.exe和srvany.exe创建windows服务[转]

    本文转自:https://www.iflym.com/index.php/computer-use/201205020001.html 在32位的windows下,包括windows7,windows ...

  8. 在64位windows下使用instsrv.exe和srvany.exe创建windows服务

    在64位windows下使用instsrv.exe和srvany.exe创建windows服务   在32位的windows下,包括windows7,windows xp以及windows 2003, ...

  9. nginx 注册为服务

    使用java service wrapper将java程序注册为windows服务 分类:Java (5677)  (8) 将java注册为windows服务后,我们就直接可以通过windows的服务 ...

随机推荐

  1. 使用CSS修改HTML5 input placeholder颜色( 转载 )

    问题:Chrome支持input=[type=text]占位文本属性,但下列CSS样式却不起作用: input[placeholder], [placeholder], *[placeholder] ...

  2. mongodb下如何开启不同端口,本地远程ip的服务器呢

    mongod --bind_ip 10.0.10.27 --port 28000 像这样可以绑定ip,绑定地址

  3. jQuery 图片轮播的代码分离

    以前遇到过jQuery实现列表自动滚动,这次的图片轮播在原理上与之相同,只有一些细微的差别,就是需要在图片的右下角显示当前图片的序号. html代码,以及对应的css代码: <div id=&q ...

  4. sublime 经验总结 主题有 less2css

    1. 安装“包控制”模块 操作步骤见该网站:https://sublime.wbond.net/installation#Simple sublime2的代码如下: import urllib2,os ...

  5. ASP.NET工具

    每个开发人员现在应该下载的十种必备工具 发布日期: 7/20/2004 | 更新日期: 7/20/2004 本文自发布以来已经增加了新信息. 请参阅下面的编辑更新. 本文讨论: • 用于编写单元测试的 ...

  6. Linux恢复删除文件

    一.介绍extundelete 1.extundelete的文件恢复工具,该工具最给力的一点就是支持ext3/ext4双格式分区恢复. 2. 在实际线上恢复过程中,切勿将extundelete安装到你 ...

  7. strcmp的源码实现

    微软方法: int __cdecl strcmp (const char *src, const char *dst) { ; while(!(ret = *(unsigned char *)src ...

  8. [译] ASP.NET 生命周期 – ASP.NET 请求生命周期(四)

    不使用特殊方法来处理请求生命周期事件 HttpApplication 类是全局应用类的基类,定义了可以直接使用的一般 C# 事件.那么使用标准 C# 事件还是特殊方法那就是个人偏好的问题了,如果喜欢, ...

  9. touches获得手指点击的坐标

    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObjec ...

  10. CPU使用率

    CPU使用率 事故回放 当时的情况是那个样子的: 1,正值饭点,客户电话说系统慢,几乎无法完成订单调度,有时还显示内存不足.当时心里的第一个声音就是,服务器配置太低了,远程一看,2核4G内存,cpu平 ...