ThankYou 0 Posted August 15, 2011 Hi, Obviously i am new to Autoit and scripting, hopefully i can get some help to start me off. I created an autoit script that automates an installation of an application. I would like this script to be scheduled on every computer through scheduletask. I have a list of computer names in an excel spreadsheet, how do i loop a command line for scheduletask but replacing the computer name each time so that it schedules the task on each different computer base on the excel file. Thank you so so much in advance and if you need further clarification please let me know. currently i have to put this into command prompt and change the workstation name for each and every workstation i would like to schedule the task on. Is there a way to change it so that it loops through but changing the "workstation" name base on an excel cell. schtasks /create /tn task1 /tr \\executebalefile.exe /sc Once /st hh:mm:ss /s \\workstation /u domain\username /p password /ru domain\username /rp password Share this post Link to post Share on other sites
PowerCat 0 Posted August 15, 2011 The Autoit script should use the Excel UDF to read each line in increment, and then execute your command, replacing the computername with the value read from the excel sheet. Share this post Link to post Share on other sites
ThankYou 0 Posted August 15, 2011 The Autoit script should use the Excel UDF to read each line in increment, and then execute your command, replacing the computername with the value read from the excel sheet.you make it sound so simple, but I am the noobiest of all noobs with autoit, sorry in advance. Could you provide me with an example? thanks Share this post Link to post Share on other sites
PowerCat 0 Posted August 15, 2011 you make it sound so simple, but I am the noobiest of all noobs with autoit, sorry in advance. Could you provide me with an example? thanksCheck the helpfile under user defined function (UDF)Excel ManagementRead some examples to know how to use _ExcelBookOpen and _ExcelReadArrayThen read up on how to make a FOR loop to look through the Array you created with _ExcelReadArrayThen on each pass of the loop, do a RUNAS or something to that effect Share this post Link to post Share on other sites
ThankYou 0 Posted August 15, 2011 Check the helpfile under user defined function (UDF)Excel ManagementRead some examples to know how to use _ExcelBookOpen and _ExcelReadArrayThen read up on how to make a FOR loop to look through the Array you created with _ExcelReadArrayThen on each pass of the loop, do a RUNAS or something to that effectUDF has a lottt in it to be learned. First two i understood, but when gets to writing the loop which calls on the arry i am lost. I learn better from seeing examples, I will keep reading. thank you for your help. Share this post Link to post Share on other sites