Jump to content

Recommended Posts

Posted

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??

Posted (edited)

There is a number of examples here to have a look through other wise the helpfile is very usefull

http://www.autoitscript.com/wiki/AutoIt_Snippets

Look in the CMD section lower down

Edited by Chimaera
Posted (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 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

 

Posted (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 by VinayKumar
Posted

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

 

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...