Sign in to follow this  
Followers 0
mailmaster

RDP connections

8 posts in this topic

I'm trying to automat a RDP conection, I create the file on the fly (a matrix of strings with all the content of the RDP file), after closing the file came the first problem, I try:

ShellExecuteWait (@SystemDir & "\mstsc.exe", $sFicheroRDP, @ScriptDir, "Connect")

but the file isn´t yet accesible.

For testing purposes, I put a msgbox to do the file accesible and then I have these errors:

(I try the file with the right connect option and is valid: it give me the RDP conection)

a) The file is not a valid RDP conexion

or

:P The file is not associated...

Tryes:

ShellExecuteWait (@SystemDir & "\mstsc.exe", $sFicheroRDP, @ScriptDir, "Connect")

RunWait(@SystemDir & "\mstsc.exe " & $sFicheroRDP)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

Hmmm..... Is the RDP file being created in the same dir as @ScriptDir?

Sure...

Share this post


Link to post
Share on other sites

How does your connection file look like? Please post here, if possible. RunWait() works on my system.

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

How does your connection file look like? Please post here, if possible. RunWait() works on my system.

Kurt

Sorry for my bad memory, always the same mistake:

Run(@SystemDir & "\mstsc.exe """ & $sFicheroRDP & """")

The quote and the double-quote...

Share this post


Link to post
Share on other sites

Sorry for my bad memory, always the same mistake:

Run(@SystemDir & "\mstsc.exe """ & $sFicheroRDP & """")

The quote and the double-quote...

I was talking about the CONTENT of the connection file (*.rdp).

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

I was talking about the CONTENT of the connection file (*.rdp).

Kurt

For your curiosity this is the content (particularities of the conexion excepted, of course):

screen mode id:i:2

desktopwidth:i:1280

desktopheight:i:1024

session bpp:i:32

winposstr:s:0,1,18,41,1280,922

compression:i:1

keyboardhook:i:2

displayconnectionbar:i:1

disable wallpaper:i:1

disable full window drag:i:0

allow desktop composition:i:1

allow font smoothing:i:0

disable menu anims:i:0

disable themes:i:0

disable cursor setting:i:0

bitmapcachepersistenable:i:1

full address:s:------>my RDP server

audiomode:i:0

redirectprinters:i:1

redirectcomports:i:0

redirectsmartcards:i:0

redirectclipboard:i:1

redirectposdevices:i:0

autoreconnection enabled:i:1

authentication level:i:0

prompt for credentials:i:0

negotiate security layer:i:1

remoteapplicationmode:i:0

alternate shell:s:

shell working directory:s:

gatewayhostname:s:

gatewayusagemethod:i:4

gatewaycredentialssource:i:4

gatewayprofileusagemethod:i:0

promptcredentialonce:i:0

drivestoredirect:s:*

username:s:------>my username

password 51:b:------>my password as a large binary hash

devicestoredirect:s:*

Share this post


Link to post
Share on other sites

I believe it's expecting a unicode strings structured file. Also, you can run it like this:

Run('mstsc "' & $sFicheroRDP & '"')

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0