<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>DisplayFusion RSS: Trigger on computer shutdown</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790</link>
<description>DisplayFusion RSS: Trigger on computer shutdown</description>
<lastBuildDate>Sun, 19 Apr 2026 10:50:41 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790</generator>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#11</link>
<pubDate>Wed, 15 Aug 2018 10:41:20 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#11</guid>
<category>DisplayFusion</category>
<description><![CDATA[As for me, it is easier to write a service. If you know Python well, then I think it will be easy to understand C#. Moreover, there is no need for something complex. Some help for understanding can be seen here:  https://docs.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creat...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
As for me, it is easier to write a service. If you know Python well, then I think it will be easy to understand C#. Moreover, there is no need for something complex. Some help for understanding can be seen here:  <a href="https://docs.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer" target="_blank" rel="nofollow"><b>https://docs.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer</b></a><br/>
Sample pseudocode:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d3049725ea831af2a8936ba88" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d3049725ea831af2a8936ba88Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d3049725ea831af2a8936ba88Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">public TestService()
{
    InitializeComponent();
    CanShutdown = true;
}

protected override void OnStart(string[] args)
{
    try
    {
        YourRequestMethod(true);
    }
    catch (Exception ex)
    {
        System.Windows.Forms.MessageBox.Show(ex.Message);
    }
}

protected override void OnShutdown()
{
    try
    {
        YourRequestMethod(false);
    }
    catch (Exception ex)
    {
         System.Windows.Forms.MessageBox.Show(ex.Message);
    }
    base.OnShutdown();
}

private static void YourRequestMethod(bool flag)
{
    if(flag)
    {
        // Your GET request to ON
    }
    else
    {
        // Your GET request to OFF
    }
}</pre><textarea id="code019da55d3049725ea831af2a8936ba88" name="code019da55d3049725ea831af2a8936ba88" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#10</link>
<pubDate>Wed, 15 Aug 2018 10:26:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#10</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm afraid there will be only one:
A shortcut tied with any keys combination like CTRL+SHIFT+S.
It allow you to run your script or any program you like,
then call "shutdown /s /f /t 0" to close all operations.
If you don't need to use any "start" command,
the sequential execution will ensure...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm afraid there will be only one:<br/>
A shortcut tied with any keys combination like CTRL+SHIFT+S.<br/>
<br/>
It allow you to run your script or any program you like,<br/>
 then call "shutdown /s /f /t 0" to close all operations.<br/>
<br/>
If you don't need to use any "start" command, <br/>
the sequential execution will ensure that all instances will run properly before shutting down.<br/>
<br/>
_________ copy ___________________________________________ a) __<br/>
Chain command since 2000, and still good today:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d305277b9a7e9b441dcd41970" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d305277b9a7e9b441dcd41970Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d305277b9a7e9b441dcd41970Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">Dir & Echo too</pre><textarea id="code019da55d305277b9a7e9b441dcd41970" name="code019da55d305277b9a7e9b441dcd41970" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
(before it was the "|" pipe)<br/>
<br/>
If you want the second command to execute only if the first exited successfully:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d3054732dacd717143c623110" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d3054732dacd717143c623110Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d3054732dacd717143c623110Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">Dir && Echo too</pre><textarea id="code019da55d3054732dacd717143c623110" name="code019da55d3054732dacd717143c623110" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
(that ensure you'll shutdown only if preceding instances was successful)<br/>
<br/>
But if you need to pass variable between one command and the others... <br/>
&gt;&gt;Delayed Expansion feature only available <b>in batch files</b> BAT, CMD:&lt;&lt;<br/>
Ex: <br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d305577e4a3946d18cedc1784" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d305577e4a3946d18cedc1784Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d305577e4a3946d18cedc1784Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">setlocal EnableDelayedExpansion && set MyVar=MyVal && echo !MyVar! && endlocal</pre><textarea id="code019da55d305577e4a3946d18cedc1784" name="code019da55d305577e4a3946d18cedc1784" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
(NOTE: The feature requires you to use ! marks in place of the % symbols.)<br/>
________________________ end copy ______________________<br/>
<br/>
For what I know Windows has no way to recognized itself any instance to run BEFORE closing operations, unless using Group Policy.<br/>
<br/>
But out of Windows you can try this with AutoHotKey<br/>
<br/>
_______ copy____________________________________ b) _____<br/>
<br/>
I made a basic batch file that will create a "test file" on the desktop. Just run the AHK file and leave it running. When the script detects a shutdown, it'll run the batch file.<br/>
This script is tested and working.<br/>
Make sure you set the path to your text file at the top of the script.<br/>
<br/>
AutoHotkey Script:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d305777e08d77174c363e6bc3" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d305777e08d77174c363e6bc3Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d305777e08d77174c363e6bc3Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">;==============================
;Set the path to your batch file.
path    := "C:\batch.bat"
;==============================

; Run script as admin. This will allow your batch file to be ran with admin priv.
if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

; Only allow one instance of the script to run.
#SingleInstance, Force

; If you don't want an icon to show in the tray,
; remove the semicolon from the line below.
;#NoTrayIcon

; When script detects WM_QUERYENDSESSION (a shutdown), run OnShutDown function.
OnMessage(0x11, "OnShutDown")
return

OnShutDown(){
    ; Run the batch file.
    Run, % path
    ExitApp
}</pre><textarea id="code019da55d305777e08d77174c363e6bc3" name="code019da55d305777e08d77174c363e6bc3" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Batch file I used for testing:<br/>
<br/>
<div class="Inline"><pre><div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d3058704db68cba840d44f87c" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d3058704db68cba840d44f87cJs'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d3058704db68cba840d44f87cJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">echo Write file before shutdown &gt; %USERPROFILE%\Desktop\ShutdownTest.txt</pre><textarea id="code019da55d3058704db68cba840d44f87c" name="code019da55d3058704db68cba840d44f87c" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div></pre></div><br/>
If you wanted to, you could always execute your batch file commands directly through AHK.<br/>
<br/>
_________________________end copy ___________________<br/>
<br/>
I stumbled upon this question myself time ago, it was easy to recover my findings.<br/>
<br/>
I Hope you'll find that useful.<br/>
( for myself I use BAT and ShortCuts )<br/>
<br/>
Alain<br/>
<br/>
References:<br/>
a) <a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true" target="_blank" rel="nofollow"><b>http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true</b></a><br/>
<br/>
b) <a href="https://superuser.com/questions/1202064/how-do-i-run-a-batch-script-at-shutdown-in-windows-10-home-edition" target="_blank" rel="nofollow"><b>https://superuser.com/questions/1202064/how-do-i-run-a-batch-script-at-shutdown-in-windows-10-home-edition</b></a>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#9</link>
<pubDate>Wed, 15 Aug 2018 04:39:31 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#9</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm looking for a solution that will work both for pressing the power button and start-&gt;shutdown.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm looking for a solution that will work both for pressing the power button and start-&gt;shutdown.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#8</link>
<pubDate>Wed, 15 Aug 2018 04:38:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#8</guid>
<category>DisplayFusion</category>
<description><![CDATA[A question :
HOW do you shut down your computer?
Power Button
&gt;Start&gt;Shutdown
BAT file ?
Alain]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
A question :<br/>
HOW do you shut down your computer?<br/>
<br/>
Power Button<br/>
&gt;Start&gt;Shutdown<br/>
BAT file ?<br/>
<br/>
Alain
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#7</link>
<pubDate>Wed, 15 Aug 2018 02:31:39 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[Unfortunately I have Windows 10 home and I don't really want to spend a hundred dollars to upgrade just for this. I've tried every solution I could find, but I can't get the group policy editor to run shutdown or logoff scripts.
Do you know if DisplayFusion tries to run the trigger when it shuts...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Unfortunately I have Windows 10 home and I don't really want to spend a hundred dollars to upgrade just for this. I've tried every solution I could find, but I can't get the group policy editor to run shutdown or logoff scripts.<br/>
<br/>
Do you know if DisplayFusion tries to run the trigger when it shuts down due to the computer shutting off and just gets interrupted? Or does it not try at all? Making my one network call is very fast and I would be hopeful it could run in the half second while windows finishes closing programs.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#6</link>
<pubDate>Tue, 14 Aug 2018 20:18:55 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[Having the "DisplayFusion Exits" trigger rules run on shutdown doesn't really work, because Windows won't wait for the stuff to run, and we can't really block shutdown because if you're executing an external command, DisplayFusion has no idea if/when it finished
However, if you're running Window...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Having the "DisplayFusion Exits" trigger rules run on shutdown doesn't really work, because Windows won't wait for the stuff to run, and we can't really block shutdown because if you're executing an external command, DisplayFusion has no idea if/when it finished <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-frown.light.svg" alt=":(" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":(" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
However, if you're running Windows 10 Pro, you could use a Shutdown or Log Off Script to do what you're looking for. If you're running Windows 10 Pro, try this:<br/>
<br/>
<ul class="ListBullet">
<li>Open a Run prompt, type gpedit.msc and click OK</li>
<li>Expand Computer Configuration > Windows Settings, and select Scripts (Startup/Shutdown)</li>
<li>Double-click Shutdown in the right-pane</li>
<li>Click Add, and add a batch file that does your stuff</li>
<li>Test it out</li></ul>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#5</link>
<pubDate>Tue, 14 Aug 2018 16:28:22 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[Quote:
I don't think shutdown.exe is run every time windows shuts down. It's just one way to trigger shutdown.
It would be trivial to write a script, either using displayfusion or just a batch script, to send the web request and then shutdown. But I want to instead have a script run automatical...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="BackGrey"><div class="Text"><div><b>Quote:</b></div>I don't think shutdown.exe is run every time windows shuts down. It's just one way to trigger shutdown.<br/>
<br/>
It would be trivial to write a script, either using displayfusion or just a batch script, to send the web request and then shutdown. But I want to instead have a script run automatically every time the computer turns off. Whether by pressing the hardware power button, or clicking shutdown in the start menu.<br/>
<br/>
I was hoping the "DisplayFusion Exits" trigger would run when the program shuts down as the computer turns off, but it's looking like that's not the case.</div></div><br/>
<br/>
This would be a shortcut on desktop maybe or just a context menu option my way but yea... troublesome.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#4</link>
<pubDate>Tue, 14 Aug 2018 09:51:33 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Look if it may be of any help.
I have create a blank shortcut on my desktop, renamed "Sleep.it", connected to Ctrl+Shift+Z,
and (inside it) inserted several chained PowerShell commands...
the last one is:
Code
Copy
Select All
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Stan...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Look if it may be of any help.<br/>
<br/>
I have create a blank shortcut on my desktop, renamed "Sleep.it", connected to Ctrl+Shift+Z,<br/>
and (inside it) inserted several chained PowerShell commands... <br/>
the last one is:<br/>
<div id="" class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019da55d307a767aa4472bb660127719" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019da55d307a767aa4472bb660127719Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019da55d307a767aa4472bb660127719Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby</pre><textarea id="code019da55d307a767aa4472bb660127719" name="code019da55d307a767aa4472bb660127719" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
I'm using it  (instead of SleepButton/Start&gt;&gt;Sleep) to ensure proper actions any time I leave my desktop.<br/>
<br/>
May be it would do if you use a similar solution to shutdown your PC instead of using PowerButton.<br/>
<br/>
Cons: you may remember it only after you pushed the Button <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":-)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":-)" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
Alain
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#3</link>
<pubDate>Tue, 14 Aug 2018 01:31:50 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[I don't think shutdown.exe is run every time windows shuts down. It's just one way to trigger shutdown.
It would be trivial to write a script, either using displayfusion or just a batch script, to send the web request and then shutdown. But I want to instead have a script run automatically every...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I don't think shutdown.exe is run every time windows shuts down. It's just one way to trigger shutdown.<br/>
<br/>
It would be trivial to write a script, either using displayfusion or just a batch script, to send the web request and then shutdown. But I want to instead have a script run automatically every time the computer turns off. Whether by pressing the hardware power button, or clicking shutdown in the start menu.<br/>
<br/>
I was hoping the "DisplayFusion Exits" trigger would run when the program shuts down as the computer turns off, but it's looking like that's not the case.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#2</link>
<pubDate>Mon, 13 Aug 2018 18:45:56 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[You could use triggers to watch a different process that always ends before df, but that may not be consistent.... Maybe you can watch for shutdown.exe to be created?
A much better option is probably using the actual scripting languages though,  C# and VB surely have an answer. I already found a...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You could use triggers to watch a different process that always ends before df, but that may not be consistent.... Maybe you can watch for shutdown.exe to be created? <br/>
<br/>
A much better option is probably using the actual scripting languages though,  C# and VB surely have an answer. I already found a shutdown after 15 seconds function, should be minimal work to edit that to be shorter and send your get? (I don't really code)<br/>
<br/>
Just realized you probably used the script already, forgot you could tie that into triggers. Just make/mod the whole script for the shutdown and make a keybind imo.
</div>
]]></content:encoded>
</item>
<item>
<title>Trigger on computer shutdown</title>
<link>https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790</link>
<pubDate>Sun, 12 Aug 2018 03:43:27 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/trigger-on-computer-shutdown/?ID=9f07647d-6ed3-4ca3-a586-d1b6d04ac790</guid>
<category>DisplayFusion</category>
<description><![CDATA[I have some Phillips Hue lights behind my desk that I want to turn off when my computer turns off, and turn on when it turns on. I've set up IFTTT to turn them on and off when it receives a specific GET request, but I'm having a very tough time getting anything to run when I shutdown. I thought o...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I have some Phillips Hue lights behind my desk that I want to turn off when my computer turns off, and turn on when it turns on. I've set up IFTTT to turn them on and off when it receives a specific GET request, but I'm having a very tough time getting anything to run when I shutdown. I thought of trying DisplayFusion since it has custom scripting and trigger functions. I wrote a quick script to send the GET request, which works, and set it up with the "DisplayFusion Exits" trigger. It works when I manually exit DisplayFusion, but it does not run when I shutdown my computer.<br/>
<br/>
Is it possible to do this with DisplayFusion?
</div>
]]></content:encoded>
</item>
</channel>
</rss>