mailmaster Posted March 11, 2009 Posted March 11, 2009 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 The file is not associated... Tryes: ShellExecuteWait (@SystemDir & "\mstsc.exe", $sFicheroRDP, @ScriptDir, "Connect") RunWait(@SystemDir & "\mstsc.exe " & $sFicheroRDP)
spudw2k Posted March 11, 2009 Posted March 11, 2009 (edited) Hmmm..... Is the RDP file being created in the same dir as @ScriptDir? Edited March 11, 2009 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
mailmaster Posted March 11, 2009 Author Posted March 11, 2009 Hmmm..... Is the RDP file being created in the same dir as @ScriptDir?Sure...
/dev/null Posted March 11, 2009 Posted March 11, 2009 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 *
mailmaster Posted March 12, 2009 Author Posted March 12, 2009 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...
/dev/null Posted March 12, 2009 Posted March 12, 2009 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 *
mailmaster Posted March 12, 2009 Author Posted March 12, 2009 I was talking about the CONTENT of the connection file (*.rdp).KurtFor your curiosity this is the content (particularities of the conexion excepted, of course):screen mode id:i:2desktopwidth:i:1280desktopheight:i:1024session bpp:i:32winposstr:s:0,1,18,41,1280,922compression:i:1keyboardhook:i:2displayconnectionbar:i:1disable wallpaper:i:1disable full window drag:i:0allow desktop composition:i:1allow font smoothing:i:0disable menu anims:i:0disable themes:i:0disable cursor setting:i:0bitmapcachepersistenable:i:1full address:s:------>my RDP serveraudiomode:i:0redirectprinters:i:1redirectcomports:i:0redirectsmartcards:i:0redirectclipboard:i:1redirectposdevices:i:0autoreconnection enabled:i:1authentication level:i:0prompt for credentials:i:0negotiate security layer:i:1remoteapplicationmode:i:0alternate shell:s:shell working directory:s:gatewayhostname:s:gatewayusagemethod:i:4gatewaycredentialssource:i:4gatewayprofileusagemethod:i:0promptcredentialonce:i:0drivestoredirect:s:*username:s:------>my usernamepassword 51:b:------>my password as a large binary hashdevicestoredirect:s:*
Authenticity Posted March 12, 2009 Posted March 12, 2009 I believe it's expecting a unicode strings structured file. Also, you can run it like this: Run('mstsc "' & $sFicheroRDP & '"')
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now