Good day, dear experts. Faced with the need to use the command windows console CMD. I call the necessary command using ShellExecute:
ShellExecute(0, 'open', 'cmd.exe', '/c regsvr32 /s some.dll', nil, SW_SHOW);
The result is zero. I tried variations on the HInstance and Self.Handle themes as the first parameter, tried to wrap the parameters in PChar and PWideChar, nothing has changed: the cmd window appears, but does not get any instructions there. I decided that maybe I made a mistake in the cmd command itself, simplified the task:
ShellExecute(0, 'open', 'cmd.exe', 'dir', nil, SW_SHOW);
The result is the same. Tell me what's wrong