1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need a way in c# .Net framework target 2.0 to extract passworded .7z or .uha!!

Discussion in 'C#' started by NightsEvil, Jun 25, 2010.

  1. NightsEvil

    NightsEvil New Member

    Joined:
    Jun 25, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hi all, im relatively new to the programing game and i have this code that i love and it works perfect except on certain systems it uses passworded SFX archives created by 7-zip, it extracts it to the app data roaming then runs the software, waits for it to finish then deletes it, its for a disk defragment software but i feel like im loseing alot of compression since its a SFX also i heard that if i build/integrate the compression into my application that it would resolve the errors i get from time to time iv heard of a few solutions one being SevenZipSharp but i cant get it to work, any ways here is the current code i am using for the SFX's and please be patient with me as i am self-learning and ill try my best to understand:

    Code:
    string tempFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
    System.Diagnostics.Process defrag1 = System.Diagnostics.Process.Start(@"AusLogics_Defrag.exe", string.Format(" -o{0} -y -Pthisisthepass", tempFolder));
    defrag1.WaitForExit();
    string executableDirectoryName = Path.GetDirectoryName(Application.ExecutablePath);
    System.Diagnostics.Process defrag2 = System.Diagnostics.Process.Start(tempFolder + "\\" + "AusLogics_Defrag" + "\\" + "DiskDefrag.exe", "");
    defrag2.WaitForExit();
    System.IO.Directory.Delete(tempFolder + "\\" + "AusLogics_Defrag", true);
    
    also note that the .WaitForExit(); which is CRUCIAL (if theres a better way let me know but i really like how it works)

     

Share This Page