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?
Save up to 50% on our desktop apps during our Year End Sale!Save up to 50% on our desktop apps during our Year End Sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save up to 50% on our desktop apps during our Year End Sale!

User Image
CBAY
4 discussion posts
Is there a script that can automatically load a monitor profile when the computer is being accessed via RDP?
hnf0mbe8uwq.NQZ6zypp
Nov 2, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

You should be able to use this line to detect if the current session is an RDP session:

Code

// check if the script is running in an RDP session
if (System.Windows.Forms.SystemInformation.TerminalServerSession)
{
// Load monitor profile here
}


Thanks!
Nov 3, 2021 (modified Nov 3, 2021)  • #2
User Image
CBAY
4 discussion posts
Hello Owen -

Thanks for your reply! I entered & verified this function, but when I click "Run Function" nothing happens. Any ideas?

Code

using System;
using System.Drawing;
public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Set your monitor profile name here
        string profileName = "Remote Single ACER";
        
        // Gets the number of monitors and if it equals 2, loads the monitor profile    
        if (System.Windows.Forms.SystemInformation.TerminalServerSession)
        {
            BFS.DisplayFusion.LoadMonitorProfile(profileName);
        }
    }
}
hnf0mbe8uwq.NQZ6zypp
• Attachment [protected]: script verify.png [335,867 bytes]
Nov 20, 2021  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Strange, is the script on the machine that you are remoting into?

Thanks!
Nov 23, 2021  • #4
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)