× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

I just wanted to add my voice to Mark's. You should be using the "rundll32" method. As long as you call 'start', it'll keep running it as an MS-DOS command (because that's where 'start' works), and that means you need to follow DOS escaping rules. It also means your user gets the (ugly) black DOS window for each command.

Use rundll32 to invoke the ShellExec_RunDLL function from shell32.dll, and you'll be using a native Windows method rather than going through the MS-DOS command interface.

PGM

DCL VAR(&CMD) TYPE(*CHAR) LEN(123)
DCL VAR(&PATH) TYPE(*CHAR) LEN(89)

STRPCO PCTA(*NO)
MONMSG IWS4010

CHGVAR VAR(&PATH) VALUE('http://example.com+
?parm1=foo&parm2=bar')

CHGVAR VAR(&CMD) +
VALUE('rundll32 shell32,ShellExec_RunDLL ' *BCAT &PATH)

STRPCCMD PCCMD(&CMD) PAUSE(*NO)

ENDPGM

This works for both URLs (as above) and for PC path names (C:\temp\Example.doc). (Just as the "start" command does.)

On 12/13/2011 11:00 AM, Mark Tate wrote:
If you prepend your command with 'rundll32 shell32,ShellExec_RunDLL '
that should also solve your problem, and you won't need to escape
characters.

Using the command like this is like executing the url from the 'run'
dialog box in windows vs a cmd window.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.