Run in background

Issue is when you disconnect server the RDP session get disconnected and drivers from your system also get disconnected to fix this open up notepad and save this command
for /f “skip=1 tokens=3” %%s in (‘query user %USERNAME%’) do (
%windir%\System32\tscon.exe %%s /dest:console
)
save this file as a batch file . every time you want to disconnect the server disconnect by running the script this script will keep system session .don’t close RDP session directly

Yea i am creating a bat file in notepad. And trigger this file using task scheduler that when RDP is disconnected this files run. So when i disconnect from RDP and run my bot through nodered the bot status is still “failed”.

I also check in that task schedular that bat file run or not. So this file run .

Please help me further what i can do

I have never seen @yashshah’s suggestion, that is neat. If i understand that correctly that will only work if only one user is logged in thou, is that correct ?

If the script is not working, then you can always look into using hd robots. That is a service you install on the machine that will auto login as one or more users using RDP and then keep the session a live.

Yeah @Allan_Zimmermann . I undestand this but currently i don’t have HD robots on server. That’s why i tried another approach to do this thing without using HD robots

@Allan_Zimmermann
my openrpa user name is Vivek.
So when i use this in cmd like :- openrpa.vivek

then it shows me that this is not an internal or external command

For installing HD robot on server . We need any paticular license for this or we use normal window server

I cannot help you with the windows licening part
Maybe check the link in this post

You do not need any license from openiap, to use hd robots. So if you make make it work your self, you are free to do so. But hd robots is UNSUPPORTED over the forum.

ok thanks @Allan_Zimmermann.
I read the article that you linked in this post.

But i have query for you . I saw you Video in the video you are using this command in cmd : - openrpa.rdservices but i my case i am using openrpa.vivek. then get this error :- "‘openrpa.vivek’ is not recognized as an internal or external command,
operable program or batch file. "

what is this issue

Well, the error is pretty clear, there is no openrpa.vivek command …
What is your arguements for assuming openrpa.vivek should exists ?

but in your videos when you are creating HD robots. You are using command like openrpa.rdservices and you get your results before this step you just create a role in openflow. The same process i am following but in cmd i saw something i have shared in above post.

Might be am wrong at some points

Maybe it’s a language barrier, but I really do not understand your question. You know the correct command is openrpa.rdservice. You try changing that and get told it does not exist. What do you expect me to do here now? Why are you not using the correct command? Please explain why you cannot or will not use the command as explained in the video.

OK @Allan_Zimmermann Sorry but i will explain you in briefly.
I am creating a role in openflow. After this we have to use the command in cmd. You are using openrpa.rdservice (rdservice is your username so in my case i have to hit command openrpa.vivek am i right ? If i tried to use this openrpa.rdservice then also get the same error ) . So when you hit the command you see some result in CMD but when i hit the command saw errors. Where i do mistake can you please correct me.
I am very thankful to you.

I hope you understand my point now.

You need to follow the video, to make it work.
The command you need to use is OpenRPA.RDService
and if that is not working, you did not follow the video ( the video explais you need to run the openrpa.msi installer and install rd service/hd robots this is what has the OpenRPA.RDService command )

well Can you tell you how you disconnect from RDP system?

Just click on the cross arrow. Is this way wrong ?

@Allan_Zimmermann Thanks . Now it’s wokring i saw some result in CMD.

Yes. follow these steps
create batch (lets say disconnect.bat) file and save code in that file.

for /f “skip=1 tokens=3” %%s in (‘query user %USERNAME%’) do (
%windir%\System32\tscon.exe %%s /dest:console
)

when ever you disconnect RDP make sure to follow these steps:
1)openRPA is open
2) caffine app is running in background which can be downloaded from link below
https://www.zhornsoftware.co.uk/caffeine/caffeine.zip
3) whenever you want to disconnect just run disconnect.bat .if it is not disconnecting RDP session than just run it as administrator.

Follow these steps It should fix issue just remember if you want to disconnect from RDp just run disconnect.bat(try with administrator if this is not working) file instead of click on clock button RDP info bar on the top

@yashshah when i run the bat file it does not disconnect me from RDP

try to run as an administrator

Yes i have already tired this