Sign in to follow this  
Followers 0
gr8BigGeek

How to start a .exe file with shortcut -a attribute?

3 posts in this topic

Hello,

Me again; Boy I'm battin' 100 this week! I've gotten myself completely stumped. This time the problem is in the ShellExecute() function. With a batch file I can start the executable by the following:

start "" "XYZPROGRAM.exe" -a "MY_GUI.mss"

as long as the .bat file is setting in the same folder as the program (or XYZPROGRAM.exe file).

The "target" location under "properties" of the shortcut on the desktop looks like this:

C:\XYZPROGRAMFILE\XYZPROGRAM.exe MY_gui terminal

How do I get Autoit to accept the "-a" attribute function? Or how can I use this -a function in Autoit to allow it to start like the .bat file?

Yes, I've tried doing:

ShellExecute(@ScriptDir & "\MYBAT.bat", 0)

to start the batch file, but I get error messages when I use shortcuts to my Autoit executable. I literally have to open the .exe file manually *sigh*.

Any help on this would be wonderful!

Thanks,

Matt~

Share this post


Link to post
Share on other sites

Hi,

have you tried:

ShellExecute ("C:\XYZPROGRAMFILE\XYZPROGRAM.exe", "-a " & chr(34) & "MY_GUI.mss" & chr (34), "C:\XYZPROGRAMFILE")

For running batches, see helpfile Run () / RunWait ().

;-))

Stefan

Share this post


Link to post
Share on other sites

Stefan,

Thank you much! I just couldn't seem to find it in the help file either. I tip my hat to you; it works!

Matt~

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