Search code examples
delphiwindows-7shellexecute

Delphi ShellExecute not working in Windows 7


I just KNOW this is something simple, but I've tried all of the suggestions I could find on this forum, and I still can't get the following ShellExecute statements, which worked perfectly well for four years on XP, to work in Windows 7.

Any suggestions gratefully received!

ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WebFTPParams.txt 91.208.99.4'), Nil, SW_SHOW);
ShellExecute(Handle, 'open', PChar('command.com'), PChar('/c ftp -s:c:\checkout\WWFTPParams.txt 212.78.232.39'), Nil, SW_SHOW);

Thanks anyway, folks, but I found the problem. I should have been using CMD.EXE rather than good old Command.com. Sorry for bothering you!


Solution

  • Command.com is not anymore in Windows (it was used in DOS). Use cmd.exe