让Outlook一直保持开启

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测试失败

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值