Hanlin
Hanlin

Reputation: 855

How to run run.exe(Win+R) with parameters in delphi?

I want to open something by using run.exe(Win+R) and different commands , I wonder how to use Delphi code to do that?

for example how to use Delphi code to do this : Win+R -> input :control admintools -> Run. it will open Administrative Tools folder;

Upvotes: 0

Views: 958

Answers (1)

David Heffernan
David Heffernan

Reputation: 612804

Use ShellExecute.

uses
  Windows, ShellAPI;
....
ShellExecute(0, nil, 'control', 'admintools', nil, SW_SHOWDEFAULT);

Upvotes: 3

Related Questions