extract ISO with winrar automatically with c# or batch

前端 未结 4 683
时光说笑
时光说笑 2021-01-20 02:36

I\'m trying to extract an ISO to a folder with the same name without .iso on the end.

I\'m having a problem with winrar as it will not start the extract when I start

4条回答
  •  臣服心动
    2021-01-20 03:13

    Try this:

    string Desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
    Process.Start("Winrar.exe", string.Format("x {0} {1}",
       Desktop + "\\test.rar",
       Desktop + "\\SomeFolder"));
    

    That would extract the file test.rar to the folder SomeFolder. You can change the .rar extention to .iso, it'll work the same.

    As far as I can see in your current code, there is no command given to extract a file, and no path to the file that has to be extracted. Try this example and let me know if it works =]

    P.S. If you'd like to hide the extracting screen, you can set the YourProcessInfo.WindowStyle to ProcessWindowStyle.Hidden.

提交回复
热议问题