Sign in to follow this  
Followers 0
OmYcroN

MFC Application

9 posts in this topic

#1 ·  Posted (edited)

Hi ! This is my first post here and it's with a problem i have with my audio driver. I m using autoit to start "Setup.exe" but it gives me an error like it s incompatible with the device but if i double click "Setup.exe" it works. I ve tried with a .bat but the same result. Can anyone tell me how to do this in autoit ? What are this mfc applications and why they have this problem with external execution ? Thx in advance. Glad to be on this forum !

Edited by OmYcroN

Share this post


Link to post
Share on other sites



:) Welcome to the 4rum

if you can manually open it, so let's the autoIT manually open it too

mousemove()
mouseclick()

it woul be change with the diffrent screen solution


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

There is a problem. The exe will be executed from a"panel" so i don t want the folder to be opened with the exe.

Share this post


Link to post
Share on other sites

Since no code is shown of the attempts with the Bat or AutoIt script so where the scripts started in the same working directory as Setup.exe? I could possibly only imagine a working directory issue unless Setup.exe is bugged.

:)

Share this post


Link to post
Share on other sites

The thing is that the path is correct (exe starts) but instead of installing the driver like when i db click it , it shows me a dialog saying that i don t have the right chip etc.

Share this post


Link to post
Share on other sites

The thing is that the path is correct (exe starts)...

That does not answer my question to the working directory. My concern for the working directory is that Setup.exe is possibly looking for files in it's own working directory and if it does not find them, then it may show an odd error.

Example, you may need to pass the working directory (2nd parameter)

RunWait(@ScriptDir & '\folder\setup.exe', @ScriptDir & '\folder')

Share this post


Link to post
Share on other sites

Many Thanks !!!

Run(@ScriptDir & '\CMedia9738\setup.exe', @ScriptDir & '\CMedia9738')

It worked. Could u explain a little about the line above ? And thx again.

Share this post


Link to post
Share on other sites

Sure, I will try.

When you double click a file to run it, it inherits the working directory where the file resides. So it can see files in it's own directory. So if the setup.exe looks for config.ini without specifying a path, then it does see it in it's working directory.

So if you ran this

Run(@ScriptDir & '\CMedia9738\setup.exe')

then setup.exe was probably looking for a file in the working directory which may have been @ScriptDir (or inherited working directory from CMD Prompt...) instead of @ScriptDir & '\CMedia9738' where it expected it. The setup file is using relative addressing to access the files within it's working directory.

Share this post


Link to post
Share on other sites

Thanx again ! I anderstand now what was the problem. :)

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  
Followers 0