jtchurch Posted February 3, 2014 Share Posted February 3, 2014 Hi There, Only been using AutoIT for a week or so, but loving what I can do with it so far! -now frustratingly stumped and running out of time. I have a software upgrade to perform on about 200 network computers during a short planned downtime. I have already created an AutoIT script that works beautifully to turn a complicated and time consuming software upgrade into a breeze. The catch is that for the script to work, I have to be logged in to the remote PC (past the Windows login). This of course severely limits my ability to automate the whole install project by running the script against a list of PCs. I have tried to simplify the process by running a batch file against the list of PCs and copying all of the 700mb+ of upgrade install files over to each PC -so at least that's done. My organization uses Dameware to provide remote support, and Dameware has a nice feature that allows command line connections complete with login info. You cant seem to use AutoIT to interact directly (using ControlClick) with a remote desktop, the most that can be done is set the Dameware remote window as active with AutoIT and throw some unilateral commands at it with a lot of SLEEP delays and hope for the best. This I have also already done, creating a simple script that will open DameWare and connect to the network pc name in the AutoIT script, log in to the remote PC load the Windows desktop and open the command prompt by sending the windows key + R and CMD. THen navigating in the command prompt window to the compiled AutoIT script and starting it. The whole process works beautifully...once. That is to say, I am still limited in that I will have to go in to the "connection" AutoIT script on my end and change the pc name in the script to kick things off, over and over again, almost 200 times. It seems like it would be a simple thing to create a GUI with the list of pc names, where I could click PCNAME01 and GOBUTTON, whereby it will commence the 'connection' script I have already created, to connect to PCNAME01. Things look good, so then I click on PCNAME02 in the GUI list and click the GOBUTTON, the same script kicks off only connecting to PCNAME02 now, etc. I imagine this is can be accomplished by putting a variable in the 'connection' script in the place of an actual pc name, the variable getting its value from whichever list item is clicked in the GUI list box. Somehow, that is as far as my brain will take me. I've looked over the documentation for the GUI and downloaded the KODA FormDesginer, so I can generate the code for the GUI (more or less)... but to connect the GUI with my script... I'm lost. Here is the connection script to use with Dameware -very simple Run("C:\Program Files\DameWare Development\DameWare Mini Remote Control 7.5\DWRCC.exe -c: -m:pcname001 -u:username -p:password -d:domainname") Sleep(5000) ControlClick("DameWare Mini Remote Control", "OK", "[ID:2]") sleep(2000) Send("username{TAB}") Send("password{ENTER}") Sleep(10000) WinActivate("pcname001 - Connected - DameWare Mini Remote") Send("{LWIN}+R") Sleep(3000) Send("CMD{ENTER}") Sleep(5000) Send("c:\autoit-script-on-remote-pc.exe{ENTER}") I don't expect free coding or anything, but is there an article or example I could look at that lays out this simple function in a way my simple mind can comprehend it? Thanks for your time folks! J. Link to comment Share on other sites More sharing options...
BrewManNH Posted February 4, 2014 Share Posted February 4, 2014 Do a google search for psexec, it will allow you to run a program on a remote computer. Also, instead of using Send, you might want to look into using ControlSend instead so that you don't need to be logged onto the computer to do what it is you need to do. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
jtchurch Posted February 4, 2014 Author Share Posted February 4, 2014 Thanks for the reply BrewMan. We use PSEXEC quite a bit in our department, especially when running a process on a list and I tried it for this first, but found that the software update install required too much interaction to do without being logged in. Link to comment Share on other sites More sharing options...
BrewManNH Posted February 4, 2014 Share Posted February 4, 2014 What's the software, and is there a silent install switch? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
jtchurch Posted February 4, 2014 Author Share Posted February 4, 2014 Software is Sunquest Lab software, Sunquest wrote the installer themselves apparently. No silent install switches to be found, no answer files, etc Link to comment Share on other sites More sharing options...
jtchurch Posted February 4, 2014 Author Share Posted February 4, 2014 (edited) And so I'm back to automating the remote access of many computers and hoping to construct a simple GUI that will input the pc name variable in to the connect script I've made. Any ideas? Edited February 4, 2014 by jtchurch Link to comment Share on other sites More sharing options...
jtchurch Posted February 4, 2014 Author Share Posted February 4, 2014 So basically something like this: VARIABLES SCRIPTS (GO BUTTON) VariableA Script1 VariableB Script2 VariableC VariableD VariableE VariebleF VariableG I could click on a selection in the VARIABLES column, choose a script from the SCRIPTS column and hit GO. 'GO' would execute the script I chose and somehow inserted the variable I chose from the VARIABLES column as input into the script. (In my case, the variables in that column would be network pc names, used instead of the actual pc name directly written in to the scripts I have now). Is this an easy setup with AutoIT? Link to comment Share on other sites More sharing options...
jtchurch Posted February 6, 2014 Author Share Posted February 6, 2014 No? Apparently I've pushed beyond the limits of AutoIT. An unpleasant surprise. I don't know why I thought this would be simple -but 75 views so far and not a single suggested AutoIT solution? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 6, 2014 Moderators Share Posted February 6, 2014 jtchurch,What you want to do sounds eninently possible. I imagine one reason that no-one has actually replied is because you appear to have made no effort to produce anything yourself and are sitting there waiting for someone to produce a working script for you. So I suggest you start coding and come up with something as a starter for 10. A couple of combos would enable you to choose the "variable" and "script" - then pressing the "Go button" would read those selections and run the "script", passing the "variable" as a command line parameter. Alternatively you can keep waiting - your choice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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