开发者

Start Windows Task from Outlook Macro

开发者 https://www.devze.com 2023-01-08 22:15 出处:网络
Is it possible to run a scheduled Task in Windows Server 2008 from an Outlook Macro? Background is that it should be possible to start this task on in开发者_StackOverflow中文版coming emails with a spe

Is it possible to run a scheduled Task in Windows Server 2008 from an Outlook Macro? Background is that it should be possible to start this task on in开发者_StackOverflow中文版coming emails with a special subject. The task normally runs every day, but sometimes it should be triggered manually and not everybody has access to the server. Maybe someone has a solution or a better alternative.

EDIT: My solution was:

Shell ("C:\Windows\System32\SchTasks.exe /run /tn ""ApprovalSupporter""")

Thanks to ho1


Can't remember the exact details, but you should be able to execute a command using ShellExecute or something similar and then you can probably just run Schtasks /RUN as described in this Technet article: Schtasks

Edit: Here's a link for ShellExecute

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号