VinayKumar Posted December 3, 2012 Posted December 3, 2012 When I am using Run("Winzip.exe") its not invoking the installation of winzip exe but ShellExecute("Winzip.exe") invokes. Is there any constraint for run command??
Chimaera Posted December 3, 2012 Posted December 3, 2012 (edited) There is a number of examples here to have a look through other wise the helpfile is very usefullhttp://www.autoitscript.com/wiki/AutoIt_SnippetsLook in the CMD section lower down Edited December 3, 2012 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
VinayKumar Posted December 3, 2012 Author Posted December 3, 2012 There is a number of examples here to have a look through other wise the helpfile is very usefullhttp://www.autoitscript.com/wiki/AutoIt_SnippetsLook in the CMD section lower downHi, thanks for your response, as its the first day I am using autoit I could not make much out of that link, I reuest you to please answer my question in one line or so
water Posted December 3, 2012 Posted December 3, 2012 (edited) Welcome to AutoIt and the forum! If your script doesn't do what you want it to do you should always do some error checking. Every function gives you a return value and sets macros @error and @extended. Run should give you the process ID. So I would use: Global $iResult $iResult = Run("Winzip.exe") MsgBox(0, "", "Result of Run: " & $iResult)Please post the result. Edited December 3, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
VinayKumar Posted December 3, 2012 Author Posted December 3, 2012 (edited) Welcome to AutoIt and the forum! If your script doesn't do what you want it to do you should always do some error checking. Every function gives you a return value and sets macros @error and @extended. Run should give you the process ID. So I would use: Global $iResult $iResult = Run("Winzip.exe") MsgBox(0, "", "Result of Run: " & $iResult)Please post the result. Hi, Thanks again, a message box comes saying "the result of the run is 0." Edited December 3, 2012 by VinayKumar
water Posted December 3, 2012 Posted December 3, 2012 In this cas Run didn't start the Exe. You have to pass the complete path to the exe plus a working directory. Please check the help file for details. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
VinayKumar Posted December 4, 2012 Author Posted December 4, 2012 Hi, I tried with the complete path but that too didn't work, but when I added #requireadmin prior to the code, it worked. But shell execute command worked even without #requireadmin
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