drloser Posted February 16, 2010 Posted February 16, 2010 (edited) Hi,I'm working on WinXP Pro. I launch autoit in a scheduled task :"C:\Program Files\autoit\AutoIt3.exe" myscript.au3myscript.au3 is very simple :Run("C:\Program Files\toto.exe") WinWait("Hello","") WinActivate("Hello","") Send("{ENTER}")All of this is configured on a server. When I'm connected to the server via MSTSC, everything is working fine :The scheduled task launches autoscriptautoscript launches toto.exeautoscript activates the window "Hello"autoscript sends the key "ENTER" (which closes the window "Hello")autoscript endsBut if I close MSTSC (I'm still connected), the script is not working anymore :The scheduled task launches autoscriptautoscript launches toto.exe??????autoscript ends, but the window "Hello" is still opened and the "ENTER" had not been sent. Edited February 16, 2010 by drloser
kaotkbliss Posted February 16, 2010 Posted February 16, 2010 Quick search on MSTSC reveiled: Creates connections to terminal servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates Windows XP connections (connections created with Client Connection Manager) to new .rdp files. so maybe your pc config needs that running to interact with the server. If you don't mind it running, then maybe a check at the beginning of your script like: $mstsc=ProcessExists("MSTSC.exe") If $mstsc=0 Then Run(@SystemDir&"\MSTSC.exe") EndIf 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
drloser Posted February 16, 2010 Author Posted February 16, 2010 (edited) I'm not sure to understand what you mean. Everything is running on the server. autoit is launched on the server by the server Tasks Scheduler. I use mstsc on my client PC in order to connect to the server and configure it, but there's no MSTSC.exe running on the server. Never. Edited February 16, 2010 by drloser
kaotkbliss Posted February 16, 2010 Posted February 16, 2010 and you need MSTSC running on your pc (not server) for script to work? Maybe a script on your pc that runs when windows starts to make sure that process is running? Or a scheduled task a couple minutes before the one on the server runs to make sure that exe is running first? 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
drloser Posted February 16, 2010 Author Posted February 16, 2010 and you need MSTSC running on your pc (not server) for script to work?Yes.I could run it everytime, but it's not acceptable: the server have to be working whithout any help.
kaotkbliss Posted February 16, 2010 Posted February 16, 2010 I don't know much about servers, but that program sounds like a vital part in communication between server and pc. It would be like trying to call your friend from a landline with no telephone lines between, without an alternative method it would be impossible. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
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