コンソールアプリケーションを介してzipフォルダーが必要なため、次のようなものを使用しました
public void DoWinzip(string zipName, string password, string folderName)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "C:\\Program Files\\WinZip\\winzip32.exe";
startInfo.Arguments = string.Format("-min -eZ {0} {1}", zipName, folderName);
try
{
// Start the process with the info we specified.
// Call WaitForExit and then the using statement will close.
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch(Exception ex)
{
// Log error.
}
}
しかし、これにより winzip パラメータの検証エラーのようなエラーが発生します。どこで間違えますか?
Update
-eZ のスペルが間違っている -ex などの可能性があります。しかし、もう 1 つの問題は、winzip が独自のウィンドウを開くことです。私はそれのために書いています-分しかしそれは開きました。