Hello,
I did not introduce myself until now, so my name is Julian, I am 22 years old and I am living in Germany.
I learned how to program with Delphi 7 and then discovered Lazarus. And now I enjoy using Lazarus and doing some hobby projects.
I'm now working with Lazarus 1.4.4 and fpc 2.6.4 , Windows 7x64.
I often found answers to my questions in this Forum, but now I can't find an answer.
I have a problem with Runcommand (found here:
http://wiki.freepascal.org/Executing_External_Programs)
in combination with executing cmd.exe and parameters, it doesn't seem to work for me.
If i execute the example
RunCommand('c:\windows\system32\cmd.exe', ['/c', 'dir /s c:\windows'], s);
it just shows an empty black cmd window and nothing else happens.
Admin rights are not the problem as it doesn't work with d:\ either.
If I manually open a cmd window and input
it works and shows the content of c:\windows.
ShellExecute(0, nil,Pchar('c:\windows\system32\cmd.exe'),Pchar('/c dir /s c:\windows'), nil, SW_SHOWNORMAL);
this also works but I do not want to use shellexecute as the program continues and does not wait for the external program.
Can you please help me ?
Thanks in advance !