I set a password on a rar file like this :
rar.exe a backup.rar c:\files -p123 -p- -k
this code set a password on my rar file and add file
to it , but i do not know what is my password.
this is my C# code :
p.StartInfo.FileName = System.Windows.Forms.Application.StartupPath + "\\Rar.exe";
p.StartInfo.Arguments = @"a backup.rar c:\files -p123 -p- -k";
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
p.Start();
p.WaitForExit();
Please provide a link to the command-line switches available for the
rar.exe
that you're using, but in some Google searching, I found this:Given that you have
-p123
, your password should be "123".