Re: Paramstr

From: Rob Kennedy (.)
Date: 11/19/03


Date: Wed, 19 Nov 2003 09:52:05 -0600


"Peder Hangh�����������������������" wrote:
> I am using Delphi 6
> I am uding shellexecute in a program to start an other program with 3
> parameters:

Might I suggest you use CreateProcess instead? ShellExecute is designed
to figure out the command line automatically by looking in the registry,
and there is the potential for confusion if what it finds in the
registry doesn't match what you tell it to use.

> Shellexecute(Handle,pchar('open'),pchar('newprogram.exe'),pchar(param1+'
> '+param2+' '+param3),Pchar(''),sw_normal)
> In Newprogram.exe i am using jeg param(1)-param(3) reading the 3 parameters.
> It works fine, but...
>
> On some - only some - windows 98 mashines it does not work.

"It does not work" is a useless description. In what way does it not
work? Does your program crash? Does ShellExecute return an error code?
Are the images loaded upside-down? On what sorts of machines does it
"work"? If you're looking at the difference between Windows 95 and
Windows NT, the length of the command line may be a factor.

-- 
Rob


Relevant Pages

  • Re: ShellExecute fails when printing a document.
    ... For this I want to find the command which is to be given. ... >> Is there a way I can overcome this issue? ... > I suggest you check the registry before using ShellExecute. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Paramstr
    ... > Might I suggest you use CreateProcess instead? ... > registry doesn't match what you tell it to use. ... Does ShellExecute return an error code? ... the length of the command line may be a factor. ...
    (alt.comp.lang.borland-delphi)
  • Re: ShellExecute
    ... The redirection operators, are part of the command ... Althought this API function is called "shellexecute" I doubt ... it's sending the command to the CLI; rather, ...
    (borland.public.delphi.nativeapi)
  • Re: send email with shellexecute but crlf in body does not work
    ... like opening up a DOS window and typing a command. ... > I try to send an email with shellexecute in FVP8 on Win2k with Outlook ... > Unfortunately the body text will not show my crlf. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: autorun.inf
    ... shellexecute e.. ... Remarks ... The open command specifies the path and file name of the application that AutoRun launches when a user inserts a disc in the drive. ... verb The verb that corresponds to the command. ...
    (microsoft.public.windowsxp.general)