0

I have a 'remote computer' (it is in a rack in my basement) that I use for processing video. When the video processing completes, the software is supposed to shutdown the computer to save power but Windows blocks it from doing so by popping up a message box that states: " If you shut down this remote computer, no one can use it until someone at the remote location manually restarts it. Do you want to continue shutting down?" But of course there is nobody to click the "yes" button so nothing happens. I'm not concerned about having to manually restart it, It is just in the basement, I'm more concerned about the computer wasting power doing nothing all night/weekend/week (sometimes it takes me a while to get back around to working on the videos). How do I disable this annoying prompt?

2
  • You have to diagnose what software is blocking the shutdown. You have not really provided enough information for us to do that
    – Ramhound
    Commented Nov 27, 2021 at 21:22
  • @Ramhound It is Windows Blocking the shutdown, there is no other software installed on this machine aside from Windows and the Video processing software.
    – Shadow351
    Commented Dec 3, 2021 at 0:13

2 Answers 2

0

Disconnect RDP using tscon by running this batch file with administrator privileges on the remote computer:

%windir%\System32\tscon.exe 0 /dest:console     
%windir%\System32\tscon.exe 1 /dest:console 
%windir%\System32\tscon.exe 2 /dest:console 
%windir%\System32\tscon.exe 3 /dest:console 
%windir%\System32\tscon.exe 4 /dest:console 

Normally closing RDP puts the remote machine into logon screen, but this will make your session continue to run, so it can continue processing videos. If you're not connected via RDP when the software tries to shutdown your computer, it should work.

2
  • I tried running as administrator and it still gives me Could not connect sessionID 0 to sessionname console, Error code 5 Error [5]:Access is denied.
    – Shadow351
    Commented Dec 3, 2021 at 0:08
  • So, it seems that I need a way to get the actual session ID in the Batch file so I can call that command on the correct session (this time my session ID was 11, but don't know if it will always be.) I'll see if I can put something together.
    – Shadow351
    Commented Dec 3, 2021 at 1:32
0

OK, Here is the batch file I put together to get the session ID and redirect it to the console. Video is processing now, so I will see if it did the trick here in a few hours.

set MY_SESSION_ID=unknown
for /f "tokens=3-4" %%a in ('query session %username%') do @if "%%b"=="Active" set MY_SESSION_ID=%%a 
echo %MY_SESSION_ID%
tscon %MY_SESSION_ID% /dest:console

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .