PDA

View Full Version : Trying to connect to the Microsoft RDP Client Control using QAxContainer.QAxWidget()



serj
4th April 2015, 16:27
Hi, everyone! Help me please with connecting to the Microsoft RDP Client Control using QAxContainer.QAxWidget()
This is a code snippet:

QAx_RDP = QAxContainer.QAxWidget(self)
QAx_RDP.setControl('{54d38bf7-b1ef-4479-9674-1bd6ea465258}')
QAx_RDP.setProperty('Server', 'xxx.xxx.xxx.xxx')
QAx_RDP.setProperty('UserName', 'user')
QAx_RDP.Connect()
All works fine, but I need to enter the password manually... The QAx_RDP object has no "password" property.. And I don't know how to pass it..
I tried to google it and found that Microsoft RDP Client Control uses vtables to get a password (and some other data) from a client...
How can I use a vtable in Python? Or maybe there is another solution?

ChrisW67
4th April 2015, 21:50
There is a ClearTextPassword property in the IMsRdpClientAdvancedSettings interface which, at a guess, should be accessible as a property of your ActiveX object.
https://msdn.microsoft.com/en-us/library/aa381172(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/aa382917(v=vs.85).aspx

serj
4th April 2015, 22:27
I have tried 4 ways to set a password, but any of them worked...

QAx_RDP.ClearTextPassword = "password"
QAx_RDP.setProperty('ClearTextPassword', "password")

QAx_RDP.AdvancedSettings2.ClearTextPassword = "password"
QAx_RDP.SetProperty('AdvancedSettings2.ClearTextPa ssword', 'password')