visual studio - How to create a sfx with progressbar by sevenzipsharp in C# -
i want create sfx file c# winforms. have downloaded sevensharp https://sevenzipsharp.codeplex.com . not step step tutorial this. similar question got stackoverflow , other site, didn't work , showing error. want add custom in sfx, when user double click "file_sfx.exe" custom form shown , ask password.
i added "sevenzipsfx.cs" class, "sevenzipsharp.dll" reference, , copied "7z.dll" output folder of visual studio.
sample code:
private void button2_click(object sender, eventargs e) { sevenzipcompressor.setlibrarypath("7z.dll"); sevenzipcompressor sevenzipcompressor = new sevenzipcompressor(); sevenzipcompressor.compressionlevel = sevenzip.compressionlevel.ultra; sevenzipcompressor.compressionmethod = compressionmethod.lzma; sevenzipsfx compressor = new sevenzipsfx("7z.sfx"); compressor.makesfx(@"e:\cm1.7z", @"e:\cm1.exe"); }
error:
Comments
Post a Comment