Page 1 of 1

ShellExecuteCommand CMD VS Direct Call of WinRAR

Posted: Thu Nov 19, 2015 7:25 pm
by Rhino Cracker
Hi,

I'm trying to make a button to simply extract a rar file
therefore I'm executing in a FTPRush-Script:
ShellExecuteCommand('D:\Programme\WinRAR\WinRAR.exe','e ' + FilePath,FileDir,0);
But it doesn't recognize the e switch, it simply opens the file.

if I execute
ShellExecuteCommand('C:\Windows\system32\cmd.exe','/C D:\Programme\WinRAR\WinRAR.exe e ' + FilePath,FileDir,0);
instead, it works, but opens a dos window.

So I've wondered what's the difference between calling WinRAR.exe directly or passing it as parameter to cmd.exe.
And why the e switch is being ignored in the first version.