RDP Remote desktop managment (start, logoff)

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

RDP Remote desktop managment (start, logoff)

Post by ricardo »

Hi,

or my daily usage i run a lot of RDP servers, using bat files.
I foun this http://forums.purebasic.fr/english/view ... 13&t=52778 but it does not let me logoff.

Does anybody knows how can i manage RDP connections, i only need to run it, logoff after some time and then, after X time, run ti again, i need to manage 5 to 10 conecctions to different windows VPS

Thanks in advance
ARGENTINA WORLD CHAMPION
infratec
Always Here
Always Here
Posts: 7582
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: RDP Remote desktop managment (start, logoff)

Post by infratec »

Hi,

maybe this helps:

https://multirdpc.codeplex.com/

search for 'Code Snippets', then you will find some informations about disconnect and reconnect.

Bernd
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: RDP Remote desktop managment (start, logoff)

Post by ricardo »

Thanks

But i want to do it from PB
ARGENTINA WORLD CHAMPION
alen
New User
New User
Posts: 7
Joined: Mon Sep 15, 2008 11:07 pm
Location: Germany

Re: RDP Remote desktop managment (start, logoff)

Post by alen »

Hello ricardo,

i dont´ t know a native way to open a rdp session with purebasic.

But you can do it as frontend for "xfreerdp". This is a commandline tool for Linux and Windows that understands many parameters.
This parameters you can feed with purebasic and runs it as external program. There are tons of them.

Here you can see the parameter reference:
https://github.com/awakecoding/FreeRDP- ... l.markdown

In most linux distributions the "xfreerdp" can be installed with package management.

For windows you can get it here:
https://cloudbase.it/freerdp-for-window ... ly-builds/

Then you can use it like this:

Linux:
xfreerdp /u:Administrator /w:1650 /h:1024 /v:10.xxx.xxx.xxx +clipboard +drives

Windows:
wfreerdp /u:Administrator /w:1650 /h:1024 /v:10.xxx.xxx.xxx +clipboard +drives

Parameter:
/u = Username
/w = width of window
/h = height of window
/v = server ip
+ clipboard = forward clipboard
+ drives = forward local drive to RDP session

This can be executed with "RunProgram(cmd, parms, workdir, flags)".

Hope it helps.
Regards,
Alen
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: RDP Remote desktop managment (start, logoff)

Post by Kwai chang caine »

Thanks ALEN for this tips 8)
Alen wrote:wfreerdp /u:Administrator /w:1650 /h:1024 /v:10.xxx.xxx.xxx +clipboard +drives
But excuse me, but like usually, i have not understand "+clipboard +drives" and how really use it :oops:

I must run one wfreerdp on each machine ?
They are a client and a server like VNC ?

I have searched on the web but not found a simple tutorial for use this great tools :|

Edit: I have perhaps understand something :oops:
https://cloudbase.it/freerdp-for-window ... ly-builds/
This tools not remote two windows machine ? but just a Linux machine by a Windows machine ..it's that ??
ImageThe happiness is a road...
Not a destination
alen
New User
New User
Posts: 7
Joined: Mon Sep 15, 2008 11:07 pm
Location: Germany

Re: RDP Remote desktop managment (start, logoff)

Post by alen »

Hello,

the wfreerdp / xfreerdp is a replacement (maybe a better version) for the mstsc.exe (Remote Desktop Client) of a windows pc / server.
You can connect with this tools to a windows pc / server which has enabled the Remote Desktop (RDP) option for remote administration.
This option is integrated in windows by default in professional and enterprise versions, but you have to enable it first before usage.

On terminal servers this option is enhanced and will be used as real terminal service. Each user on such terminal server gets his own desktop and settings to it, and can use applications.
The server component is on the remote pc by enabling the remote desktop option and the client component is located on your local maschine - the mstsc.exe (Remote Desktop Client) or as replacement the freerdp tool.

You need only one mstsc.exe or the freerdp tool on your client to connect to the remote pc / server. It is only the client component.

When you are using the mstsc.exe (Remote Desktop Client) on a windows maschine to connect to a remote deskop of a remote windows maschine, if this option is enabled.
You can configure such a connection with this microsoft tool for screen resolution you want to see in this session (windowed or fullscreen) or other parameters.
This settings you can save and reuse it everytime you doubleclick on the saved preferences file.

It is similar to VNC but developed by microsoft with own protocol specs.
https://en.wikipedia.org/wiki/Remote_Desktop_Services


Commandline options:
Another Option is that you can redirect your local drives inside the Remote Desktop Session. Your local drives will be shown within this session as network drives and you can copy data from your local maschine to the remote maschine. To do this with the freerdp tool you can set the option "+drives". Then your local drives will be mapped to the remote desktop session.

When you have a remote desktop active maybe you want to copy some clipboard data copied by "CTRL-C" to your pcs clipboard to the remote desktop session this can be tricky. Because you must enable this option in the remote desktop client. To to this and enable it you can use "+clipboard" in the commandline of the freeredp tool.

Hope that helps for better understanding :D

Regards,
Alen
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: RDP Remote desktop managment (start, logoff)

Post by Kwai chang caine »

Yes thanks a lot, i have all understanding now :D
It's not that i believe, since several days i search about remoting PC, i have see a tips for use mstsc.exe on an USB key.
Apparently you just need to copy it and the DLL, that's all.

Me i search a way for remote PC the most simply possible.
They are numerous free or not softwares who do that
I have try all of it, and i have found a japanese jewel "ZeroRemote", Never i have seen most simple :shock:
No installation, just one little exe....incredible

Beside him, VNC is the cockpit of boeing 747 :mrgreen:
Just 4 buttons, and one for go to the site, other for translate english/Japanese

I have try it, between W8 and W7, it is very fluid :shock:
I fall in love !!!!

Now, i have another problem, i search to use it in port 80, for not modify the router
For the moment the only way i have found is Teamviewer, but i'm forcing to pass by his site :|
Hors perhaps TightVNC (very simple too) in listening mode, i have read it's possible to use it without modify something in the configuration of proxy or box/router

It's not simple to want help my granny mother :lol:
Image
ImageThe happiness is a road...
Not a destination
Post Reply