Jump to content
Sign in to follow this  
h711

FileChangeDir cause exe file to run endless times

Recommended Posts

h711

I need to launch my script from target program location. So I do the following:

FileChangeDir("E:\")
Run("Install.exe")

This code works fine if you run it from .au3 file, but once you compiled it to exe and click on it, it will repeatedly launch itself endless times.

Run("E:\Install.exe")
works fine for both .au3 and .exe. So I assume
FileChangeDir("E:\")
is the part that caused the trouble.

Any ideas? Thanks!

Share this post


Link to post
Share on other sites
h711

Ok, I found a way out.

FileChangeDir("E:")
Run("\Install.exe")

This seems to work for both .au3 and .exe. I guess it is the "\" been handled differently for .au3 and .exe.

Share this post


Link to post
Share on other sites
LimeSeed

I need to launch my script from target program location. So I do the following:

FileChangeDir("E:\")
Run("Install.exe")

This code works fine if you run it from .au3 file, but once you compiled it to exe and click on it, it will repeatedly launch itself endless times.

Run("E:\Install.exe")
works fine for both .au3 and .exe. So I assume
FileChangeDir("E:\")
is the part that caused the trouble.

Any ideas? Thanks!

maybe theres a file in E that is called install.exe and that runs install.exe and it goes on in a loop?? OR MAYBE ITS BECAUSE FILECHANGEDIR DOES NOT MAKE THE SCRIPT LOOK FOR INSTALL.EXE IN DRIVE E:\ YOU NEED TO MAKE IT RUN("E:\INSTALL.EXE") AND THAT SHOULD WORK! Edited by LimeSeed

global $warming = true

Share this post


Link to post
Share on other sites
trancexx

Ok, I found a way out.

FileChangeDir("E:")
Run("\Install.exe")

This seems to work for both .au3 and .exe. I guess it is the "\" been handled differently for .au3 and .exe.

No, that's not it.

You compiled your script to Install.exe and that caused it to run it self endlessly

Edited by trancexx

♡♡♡

.

eMyvnE

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.