Jump to content

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


Recommended Posts

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~

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

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