1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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

    Jun 25, 2010
    Likes Received:
    Trophy Points:
    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:

    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));
    string executableDirectoryName = Path.GetDirectoryName(Application.ExecutablePath);
    System.Diagnostics.Process defrag2 = System.Diagnostics.Process.Start(tempFolder + "\\" + "AusLogics_Defrag" + "\\" + "DiskDefrag.exe", "");
    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