Jump to content
Sign in to follow this  
LMenard

Stuck at square 1: Can't launch an executable

Recommended Posts

LMenard

Folks, I'm brand new to AutoIt.  I downloaded and installed the current version (I'm running on Windows 10 64-bit).

I ran the "notepad" tutorial no problem.  But when I change the Run() to point to any executable in the same directory as the script (including the AutoIt installer) it never launches.

Run("autoit-v3-setup.exe")

Nothing happens.

I've also tried specifying the full path:

Run("C:\Users\Me\Documents\autoit-v3-setup.exe")

No difference.

I even tried changing directory:

FileChangeDir("C:\Users\Me\Documents")

Run("autoit-v3-setup.exe")

What am I missing?

Thanks.

Edited by LMenard

Share this post


Link to post
Share on other sites
Jos

What returncode and errorcode are returned by run?

jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
LMenard

Sorry, but like I said, I'm brand new to AutoIt...

How do I display the return code and error code?  I couldn't find an example of that in the Tutorials.

I added "@error" to my script and it didn't change anything.  I get no output.

I also tried adding "@exitCode" but got an error saying that was not valid.

Thanks.

Share this post


Link to post
Share on other sites
LMenard

ShellExecute() didn't change anything either I'm afraid.

But... I compiled it into an exe instead of just running it, then did "Run as Administrator" on the exe and it now works.

My current account is an Administrator, so I'm not sure why I have to do this, but I'll continue digging into it.

A suggestion... a few more tutorials would be nice.

Thanks.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×