Jump to content

Opening an application


Recommended Posts

Newb here.

I'm wanting to open MAS200 and eventually run processes and reports within that application.

The target for the shortcut on my desktop is...

"C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\pvxwin32.exe" ../launcher/sota.ini *Client -ARG "MyServer" "10000" "MAS 200"

I've already tried...

ShellExecute("C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\pvxwin32.exe" "../launcher/sota.ini *Client -ARG 'MyServer' '10000' 'MAS 200'")

and

Run(@ProgramFilesDir & '\Sage Software\MAS 200 Client\Version4\MAS90\Home\pvxwin32.exe ../launcher/sota.ini *Client -ARG "MyServer" "10000" "MAS 200"')

and

Other variations with the single and double qoutes.

Does anyone have any suggestions on how I could get MAS 200 open.

Thanks in advance for your help.

bruddahjoe

Link to comment
Share on other sites

If you use ShellExecute, try single quotes around everything?:

ShellExecute(' "C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\pvxwin32.exe" "../launcher/sota.ini *Client -ARG 'MyServer' '10000' 'MAS 200'" ')oÝ÷ ØGb´*+­ç-í¡¦è½ë®*m¬yÚ'ßÛgyçl¢f§ÊȧWªº^±«­¢+ØÀÌØíµôÌäìÅÕ½ÐíèÀäÈíAɽɴ¥±ÌÀäÈíMM½ÑÝÉÀäÈí5LÈÀÀ
±¥¹ÐÀäÈíYÉÍ¥½¸ÐÀäÈí5LäÀÀäÈí!½µÀäÈíÁÙáÝ¥¸ÌȹáÅÕ½ÐìÅÕ½ÐìÐØìÐØì½±Õ¹¡È½Í½Ñ¹¥¹¤©
±¥¹ÐµI5åMÉÙÈÄÀÀÀÀ5LÈÀÀÅÕ½ÐìÌäì)M¡±±áÕÑ ÀÌØíµ¤
Edited by MrMitchell
Link to comment
Share on other sites

I think you're short a comma in the ShellExecute statement.

The forward slashes don't seem right either.

Your desktop shortcut is specifying a "Start in:" folder, which allows the referential pathname (..\) in your parameter to work. You need the full path specified, or, maybe add a third "workingdir" parameter to your ShellExecute statement.

A little trial and error ought to find something this MAS program will accept.

$cmd = '"C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\pvxwin32.exe"'
$parm = '"C:\\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\launcher\sota.ini" *Client -ARG MyServer 10000 MAS 200'
ShellExecute($cmd, $parm)

or

$pgmdir = "C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\"
$pgm = '"' & $pgmdir & 'pvxwin32.exe"'
$parm = '..\launcher\sota.ini" *Client -ARG MyServer 10000 MAS 200'
ShellExecute($pgm, $parm, $pgmdir)
Edited by Spiff59
Link to comment
Share on other sites

Everyone,

Thanks for replying so quickly.

Spiff59, I used your second code (with one minor change), taking out the double quote after sota.ini. Otherwise, it works great!

Working Code:

$pgmdir = "C:\Program Files\Sage Software\MAS 200 Client\Version4\MAS90\Home\"
$pgm = '"' & $pgmdir & 'pvxwin32.exe"'
$parm = '..\launcher\sota.ini *Client -ARG MyServer 10000 MAS 200'
ShellExecute($pgm, $parm, $pgmdir)

So far, from what I've seen and experienced with AutoIT and this forum, I'd have to say "I'm impressed!!!". Though I have so much more to read and learn, this should make my life so much better.

Thanks again.

bruddahjoe

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...