This script works for me from a Windows RDP session:
Quote
@echo off
echo Remote Desktop will be temporarily disconnected. Please reconnect after a few seconds.
pause
@echo onREM The active session has an arrow as the first character
setlocal EnableDelayedExpansion
FOR /F %%A in ('qwinsta') do (
set tempSessionName=%%A
if "!tempSessionName:~0,1!"==">" (
@echo on
tscon.exe !tempSessionName:~1! /v /dest:console
@echo off
)
)
@echo off
echo Starting Cura . . .
@echo on
call "C:\Program Files\Ultimaker Cura 4.1\Cura.exe"
@echo off
pause
Caveat: it needs to be run elevated to connect back to the console. I don't know how this will work on a server hosting multi-user RDP sessions.
Recommended Posts
ahoeben 1,888
This StackExchange post explains the problem adequately:
https://stackoverflow.com/questions/51705471/current-state-and-solutions-for-opengl-over-windows-remote
As mentioned in that answer, perhaps you could write a script that closes the RDP connection and then launches Cura
https://social.technet.microsoft.com/Forums/windowsserver/en-US/c8295ef8-3711-4576-9293-2c4965280165/opengl-and-remote-desktop?forum=winserverTS
Link to post
Share on other sites