让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本身支持服务才可以
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测试失败
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了