Jump to content

Help - using Task Scheduler to trigger a message when DCS.exe is exited.


Recommended Posts

Hey all - there are a series of things i try to remember when i am shutting down DCS - its everything such as powering down my usb hub for peripherals, charging my delan clip/headset, shutting down trackir camera etc.

I often forget to charge or turn off some of my wireless items and was thinking i could trigger a displayed message using task scheduler recognition of dcs.exe being closed down.

Does anyone have any experience?  I think it may need a custom XML to monitor event logs but i do not know how to set it up.  i googled other efforts like this: https://superuser.com/questions/1617797/task-scheduler-trigger-task-when-a-process-terminates but cannot get it to work.

Any windows gurus willing to help a fella out?

i would note that my DCS.exe does not sit in traditional program file or x86 paths as it is on NVME.


Edited by dooom

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Link to comment
Share on other sites

Google or Bing is your friend

 

Ok, here are the steps to create the task:

  1. Press the Start button and search and open Task Scheduler.
  2. Click Create basic task in the Actions pane.
  3. Set a Name and a Description for the task and click Next.
  4. Choose When a specific event is logged as the trigger and click Next.
  5. Select Application as the log, Process Exit as the source, and DCS.exe as the event ID and click Next.
  6. Choose Start a program as the action and click Next.
  7. Browse for a script file that will display the message you want. You can use PowerShell or VBScript to create the script. For example, you can use this PowerShell script:
Add-Type -AssemblyName PresentationFramework
[System.Windows.MessageBox]::Show('Remember to do these things when shutting down DCS', 'Reminder')
  1. Click Next and then Finish to create the task.

Now, whenever you close DCS, you should see a popup message on your screen.

I hope this helps. Is there anything else I can do for you?

 

 

Hey, that's from Bing AI, not me

Gigabyte Aorus X570S Master - Ryzen 5900X - Gskill 64GB 3200/CL14@3600/CL14 - Asus 1080ti EK-waterblock - 4x Samsung 980Pro 1TB - 1x Samsung 870 Evo 1TB - 1x SanDisc 120GB SSD - Heatkiller IV - MoRa3-360LT@9x120mm Noctua F12 - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" QHD Gsync 144Hz - Corsair K70 RGB Pro - Win11 Pro/Linux - Phanteks Evolv-X 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...