Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How do I run an exe from within my program?

dominotedominote Member Posts: 23
Just need a basic sourcesnippet on how to start an exe file located on the harddrive somewhere. Anyone who can help me?

Comments

  • zibadianzibadian Member Posts: 6,349
    : Just need a basic sourcesnippet on how to start an exe file located on the harddrive somewhere. Anyone who can help me?
    :
    This kind of question has been asked several times the last few months. I would suggest that you use the ShellExecute() api function. You can find examples in other threads on this board.
  • dominotedominote Member Posts: 23
    : : Just need a basic sourcesnippet on how to start an exe file located on the harddrive somewhere. Anyone who can help me?
    : :
    : This kind of question has been asked several times the last few months. I would suggest that you use the ShellExecute() api function. You can find examples in other threads on this board.
    :
    Yeah I found a source that would suite me good:

    var
    s:string;
    begin
    s:='C:WindowsRegEdit.exe'; {Put your file here}
    shellexecute(handle,nil,pchar(s),nil,nil,sw_show);
    end;

    But what's the uses to add?

  • zibadianzibadian Member Posts: 6,349
    : : : Just need a basic sourcesnippet on how to start an exe file located on the harddrive somewhere. Anyone who can help me?
    : : :
    : : This kind of question has been asked several times the last few months. I would suggest that you use the ShellExecute() api function. You can find examples in other threads on this board.
    : :
    : Yeah I found a source that would suite me good:
    :
    : var
    : s:string;
    : begin
    : s:='C:WindowsRegEdit.exe'; {Put your file here}
    : shellexecute(handle,nil,pchar(s),nil,nil,sw_show);
    : end;
    :
    : But what's the uses to add?
    :
    :
    ShellApi
  • dominotedominote Member Posts: 23
    [b][red]This message was edited by dominote at 2004-5-15 22:41:10[/red][/b][hr]
    : : : : Just need a basic sourcesnippet on how to start an exe file located on the harddrive somewhere. Anyone who can help me?
    : : : :
    : : : This kind of question has been asked several times the last few months. I would suggest that you use the ShellExecute() api function. You can find examples in other threads on this board.
    : : :
    : : Yeah I found a source that would suite me good:
    : :
    : : var
    : : s:string;
    : : begin
    : : s:='C:WindowsRegEdit.exe'; {Put your file here}
    : : shellexecute(handle,nil,pchar(s),nil,nil,sw_show);
    : : end;
    : :
    : : But what's the uses to add?
    : :
    : :
    : ShellApi
    :
    Thanks a bunch!

    Anyway I ran into trouble since the program I'm trying to launch is a dos program. Anything else to think about when launching a dos program?


Sign In or Register to comment.