sharathpoluru Posted February 10, 2014 Share Posted February 10, 2014 (edited) Hello All: I am working on a below Proof of Concept/Activity: - Connect to workstation/machine via RDP (i.e. Remotely) - Invoke Acrobat Reader in remote machine - Close the reader after it is invoked Tried performing above steps using RUNAS command. However, I was unable to connect to machine remotely. Can someone please share some insight?. Any assistance is highly appreciated. Thanks .. Regards, Sharath Edited February 10, 2014 by sharathpoluru Link to comment Share on other sites More sharing options...
orbs Posted February 10, 2014 Share Posted February 10, 2014 hello sharathpoluru, welcome to Autoit and to the forum! after you connect to RDP, if you need to open/close apps and do other stuff with AutoIt, you must copy the AutoIt script (compiled, obviously) to the remote workstation and launch it insied the RDP session. a script running on your workstation will not interact with windows running inside the RDP session. other than that, your description is quite vague. what exactly is not working? RunAs has nothing to do with what you are trying to accomplish, so what exactly did you try? what error messages do you get? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
sharathpoluru Posted February 10, 2014 Author Share Posted February 10, 2014 hello sharathpoluru, welcome to Autoit and to the forum! after you connect to RDP, if you need to open/close apps and do other stuff with AutoIt, you must copy the AutoIt script (compiled, obviously) to the remote workstation and launch it insied the RDP session. a script running on your workstation will not interact with windows running inside the RDP session. other than that, your description is quite vague. what exactly is not working? RunAs has nothing to do with what you are trying to accomplish, so what exactly did you try? what error messages do you get? Thank you for sharing some insight. Let me elaborate the problem statement. I am trying to invoke some applications installed on 1000 machines on a domain via RDP. For instance, Acrobat Reader is one such application installed in 1000 machines on a domain wherein I am trying to invoke arcobat reader on each machine via RDP (i.e. remotely) and close it. This ensures my requirement is met. Having said that, I am checking the feasibility to automate above task. Please let me know, if we can achieve above task using AutoIT. Thanks. Note: As part of analysis, I have identified RunAs function where it can invoke .exe from selected location via RDP RunAs ( "username", "domain", "password", logon_flag, "program" [, "workingdir" [, show_flag [, opt_flag]]] ) Link to comment Share on other sites More sharing options...
orbs Posted February 10, 2014 Share Posted February 10, 2014 yes you can. but first, do you need to do something that requires desktop interaction, or psexec will do? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
sharathpoluru Posted February 10, 2014 Author Share Posted February 10, 2014 yes you can. but first, do you need to do something that requires desktop interaction, or psexec will do? Yes. Psexec will do .. Link to comment Share on other sites More sharing options...
orbs Posted February 10, 2014 Share Posted February 10, 2014 cool. just remember that psexec launches it's process in the background with the local system account, so you can't interact with open windows and applications. best of luck! Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
sharathpoluru Posted February 10, 2014 Author Share Posted February 10, 2014 cool. just remember that psexec launches it's process in the background with the local system account, so you can't interact with open windows and applications. best of luck! Thanks. However, there is a pointer here. I am trying to invoke some 'Proprietary Application' (i.e. Home grown applications) wherein we see a shortcut only on desktop (i.e. Home grown application with NO .exe or .bat and so on in C: drive. We see only a shortcut of home grown application on desktop) Hence, do we have a way to invoke the relevant shortcut of these home grown application?. Link to comment Share on other sites More sharing options...
orbs Posted February 10, 2014 Share Posted February 10, 2014 (edited) find which exe is launched by the shortcut: by external program: http://www.nirsoft.net/utils/shman.html by AutoIt script: '?do=embed' frameborder='0' data-embedContent>> the hard way: launch it and see which exe is added to the processes list in Task Manager. EDIT: for "home grown" application, you do a really good job if you can't get the exe from the shortcut Edited February 10, 2014 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
sharathpoluru Posted February 10, 2014 Author Share Posted February 10, 2014 find which exe is launched by the shortcut: by external program: http://www.nirsoft.net/utils/shman.html by AutoIt script: '?do=embed' frameborder='0' data-embedContent>> the hard way: launch it and see which exe is added to the processes list in Task Manager. EDIT: for "home grown" application, you do a really good job if you can't get the exe from the shortcut Thank you for prompt response. Let me go back and validate to see, if my requirement is achieved. Will keep you posted with latest updates. Thanks .. Regards, Sharath Link to comment Share on other sites More sharing options...
BlackDawn187 Posted February 10, 2014 Share Posted February 10, 2014 (edited) You could always make a AutoIt script that checks a web server page for instructions. Then, Install such script on your domain computers and, Set it to autorun on boot/login. Build a check to pause the script if $NewMessage = $OldMessage. That way you could launch AdobeReader on 1000 computers simultaneously. Though, The ethics of such script may be questionable. It seems in your situation it would solve your issue in the simplest of ways. Which would free up a lot of your time and, resources. Edited February 10, 2014 by BlackDawn187 Link to comment Share on other sites More sharing options...
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