Complete documentation for WinRAR.exe can be found in help of WinRAR opened with Help - Help Topics or pressing key F1. GUI version WinRAR.exe supports more than console version Rar.exe and therefore the list of switches differ slightly. I suggest to build the command line while reading it and test the command line first from within a command prompt window.
#Mac open rar command line manual
The manual is text file Rar.txt in program files folder of WinRAR which you should read from top to bottom. Last but not least there is a complete manual for Rar.exe which of course can also extract files and folders from a RAR archive which makes additional usage of UnRAR.exe useless. Also UnRAR.exe outputs a brief help if executed without any parameter. P.StartInfo.Arguments = "x -p" + pw + " PL_LOCKED_ARCHIVE.rar" įurther all commands and switches of console version Rar.exe are briefly explained when simply running Rar.exe without any parameter in a command prompt window. P.StartInfo.FileName = Files\WinRAR\UnRAR.exe" P.StartInfo.Arguments = "a -p" + pw + " PL_LOCKED_ARCHIVE.rar " + fld P.StartInfo.FileName = Files\WinRAR\Rar.exe" So first of all you need to correct StartInfo: void LOCK(string fld, string pw) The result is most likely an error message because of invalid command rar respectively unrar as the first argument must be a or x for WinRAR.exe. That is of course wrong as you do not want to run WinRAR.exe with first argument being a reference to console version Rar.exe or UnRAR.exe. The StartInfo you define results in running WinRAR.exe with command line: C:\Program Files\WinRAR\WinRAR.exe unrar x -p pw PL_LOCKED_ARCHIVE.rar