vds48003 Posted December 29, 2015 Share Posted December 29, 2015 Sorry, I am new to autoitMy professor asked me to use autoit to make an oneclick install for all the toolsSo I put all the file under the folder like the picture belowBefore I make one click, I separate all the install process and tried them outHere's my codeexpandcollapse popupWhile 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case $idInstallAll Case $idInstallPCP Run("..\PCPanelSaw\setup_x86_PCPanelSAWV3R90R13T42R3.exe","") WinWaitActive("PCPanelSaw - InstallShield Wizard", "Welcome to the InstallShield Wizard for PCPanelSaw") Send("!n") WinWaitActive("PCPanelSaw - InstallShield Wizard") Send("!n") WinWaitActive("PCPanelSaw - InstallShield Wizard") Send("!i") WinWaitActive("PCPanelSaw - InstallShield Wizard","InstallShield Wizard Completed") Send("!f") Case $idInstallKeyA ;Run("..\KeyDriver\Key-A.exe","") ;WinWaitActive("Sentinel HASP Run-time Setup") ;Send("!n") ;ControlClick("Sentinel HASP Run-time Setup","","Button3") ;Send("!n") Case $idInstallKeyB ;Run("..\KeyDriver\Key-B.exe","") Case $idInstallRec Run("..\RecordView\setup.exe","") WinWaitActive("PcPanelSaw RecordView - InstallShield Wizard", "Welcome to the InstallShield Wizard for PcPanelSaw RecordView") Send("!n") WinWaitActive("PcPanelSaw RecordView - InstallShield Wizard") Send("!n") WinWaitActive("PcPanelSaw RecordView - InstallShield Wizard") Send("!n") WinWaitActive("PcPanelSaw RecordView - InstallShield Wizard") Send("!i") WinWaitActive("PcPanelSaw RecordView - InstallShield Wizard","InstallShield Wizard Completed") Send("!f") EndSwitch WEndI am sure for the $idInstallPCP and $idInstallRec is certainly correct but my problem isWhen I didn't put the exe file in the folder, everythings goes wellbut after I sort them into separater folder, $idInstallRec still works fine, however the $idInstallPCP just don't work at allIs there any problem with my code?Or do I need to change the folder... etc Link to comment Share on other sites More sharing options...
TheSaint Posted December 29, 2015 Share Posted December 29, 2015 (edited) @vds48003 - Welcome to the forum. Without seeing the rest of your code, I'm not sure why you need to run Case statements, and are not just running all your commands one after the other, possibly as a function for each, that only moves on to the next when it has finished the current processes.As for your problem with Run..\ means current folder is root (which you want)..\ means parent folder is root (so one up, which you don't want) Edited December 29, 2015 by Santa Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
water Posted December 29, 2015 Share Posted December 29, 2015 When installing a program I wouldn't automate the installation GUI. Most of the programs have a "silent installation command line switch".Search the web for this keywords plus the name of the program and you will see how to call the installation program. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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