solultionsville Posted October 18, 2016 Posted October 18, 2016 I am new to AutoIt and not done much scripting before. I have around 600 devices that I need to push a firmware file to, and I have been trying to figure out how to automate answering yes a command prompt for each devices. In a command prompt I use the following command for a single connection. The echo y before the pipe command will send a y to the command interpreter and accept the SSH keys. echo y | pscp -v –scp –pw passwd C:\CNA1000\Firmware\CNA1504v1.1.7\CNA1504v1_1_7.run root@192.168.1.100:/tmp/. I have tried adding this to a batch file and then adding a second device on the next line i.e. echo y | pscp -v –scp –pw passwd C:\CNA1000\Firmware\CNA1504v1.1.7\CNA1504v1_1_7.run root@192.168.1.100:/tmp/. echo y | pscp -v –scp –pw passwd C:\CNA1000\Firmware\CNA1504v1.1.7\CNA1504v1_1_7.run root@192.168.1.101:/tmp/. So with it this way, for some reason it keeps prompting for a user password and continues until I kill the batch. I am looking for a way to use AutoIt to answer Yes so that I do not have to connect to some 600 plus devices once prior to running the firmware update. Thanks,
spudw2k Posted October 18, 2016 Posted October 18, 2016 You should be able to use the StdIn/StdOut funcs to accomplish what you want..at least I used them to do something similar with plink. 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
spudw2k Posted October 19, 2016 Posted October 19, 2016 Let me know what questions you have. It's been a long time since I used that code and I've adopted many scripting best practices and improved methods since then (*cough*--better comments and structure for one--*cough*). 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
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