Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Nafanoul
16 discussion posts
on my PC, I have one windows user designated for when I use my television. On startup of this windows user, I have a bat file which automatically switches the monitor profile to one made for the TV. I have tried to make a bat file which switches the monitor profile back to my PC monitors when I shutdown, however it seems my system shuts down before the profile loads. My bat file for shutdown looks something like this.

start /b /wait "path to DisplayfusionCommand.exe" -monitorloadprofile "desired profile"
start /b "" "C:\windows\system32\shutdown.exe" -s -t 0

I read in another thread that this could possibly be accomplished through a DisplayFusion script, which could presumably wait to initiate the shutdown until the monitor profile change. I am not a coder, and was wondering how I could do this within DisplayFusion. Furthermore, I have been using bat files, as I can execute them with a controller directly from Playnite.
• Attachment: image.jpg [6,216,758 bytes]
image.jpg
image.jpg
Jul 13, 2022  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
I've attached a script below that should do this for you. You can import it via the DisplayFusion Settings > Functions > Scripted Function > Import Scripted Function.

You can adjust the name of the monitor profile you want to load on line 12. You can also adjust the time it waits to shutdown in milliseconds on line 13, if the shutdown is happening too fast.

I'd also recommend enabling this advanced setting in DisplayFusion so a confirmation window doesn't appear after that profile is loaded: https://www.displayfusion.com/AdvancedSettings/?Version=9.9.99.116#monitorconfiguration_dontshowconfirmationprompt


Hope that helps!
• Attachment: Load Monitor Profile and Shutdown.dfscript [2,286 bytes]
Jul 14, 2022  • #2
User Image
Nafanoul
16 discussion posts
thank you for the reply. since you mentioned adding a delay to the shutdown, does that mean DisplayFusion might shutdown before the monitor profile is properly loaded? otherwise i can just use the bat file with a delay. or would displayfusion be able to wait with the shutdown until the monitor profile is properly changed.

as soon as the monitor profile is properly loaded, i want the system to shutdown immediately. furthermore, with the script you made, could you call upon it with somethjng like a shortcuts from Playnite?
Jul 14, 2022  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
DisplayFusion should be loading the profile fully before shutting down. I added that thread wait as a buffer if you were running into issues, but you really shouldn't need it.

Is Playnite able to access the command line? If so, you could have it run a command like this:

Code

DisplayFusionCommand.exe -functionrun "ScriptName"
Jul 15, 2022  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)