C# to extract
-
Can anyone help in extracting the exe files in such a way that the exe file does not install but extracts the all the files in a separate folder?
-
Can anyone help in extracting the exe files in such a way that the exe file does not install but extracts the all the files in a separate folder?
I gues you need a Zip like utility. There is a free zip lib made in C# here icsharpcode.net
-
I gues you need a Zip like utility. There is a free zip lib made in C# here icsharpcode.net
thanks for ur response. No i don't want any zip like utility. if i use diagonostics.process...,start(),waitforexit(), the exe file is extracted to install, but i want the exe file to extract to be unzipped or stored & not installing the exe package.
-
thanks for ur response. No i don't want any zip like utility. if i use diagonostics.process...,start(),waitforexit(), the exe file is extracted to install, but i want the exe file to extract to be unzipped or stored & not installing the exe package.
You'll have to find out what the command line parameters are for the file you want to unpack. If the .EXE supports the functionality you want, you're in business, all you have to do is use the correct commandline parameters to tell the .EXE to unpack itself but not run its setup. If not, oh well... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Can anyone help in extracting the exe files in such a way that the exe file does not install but extracts the all the files in a separate folder?
system.diagnostics.process.start("filename.zip"); will extract the file (if it is an exe file , it starts to install)...all i need is to unzip the filename.zip, so that i can store the unzipped contents in another folder. thanks
-
system.diagnostics.process.start("filename.zip"); will extract the file (if it is an exe file , it starts to install)...all i need is to unzip the filename.zip, so that i can store the unzipped contents in another folder. thanks
If you start a .ZIP file, it'll open in whatever application is registered to handle .ZIP files. It won't unpack the thing unless you give the correct command line parameters. An .EXE is a different story. Not every .EXE self installer uses the same compression engine, so the command line parameters are going to be different from .EXE to .EXE. Herein lies your problem. You can attempt to use launch WinZip, or whatever .ZIP application your using, with the .EXE name in place of the .ZIP filename you would normally use. For example, a hypothetical command line for unzipping a .ZIP file might be:
WinZip -u -s myfile.zip c:\myfolder
You can replace the .ZIP filename with the selfextracting .EXE to unpack it:
WinZip -u -s mysetup.exe c:\myfolder
The problem with launching an .EXE and getting it to unpack itself is you don't know ahead of time if the .EXE supports unpacking with launching, unpacking to a traget folder, or what the proper command line parameters are to get it to unpack. You can only guess at this stuff. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
If you start a .ZIP file, it'll open in whatever application is registered to handle .ZIP files. It won't unpack the thing unless you give the correct command line parameters. An .EXE is a different story. Not every .EXE self installer uses the same compression engine, so the command line parameters are going to be different from .EXE to .EXE. Herein lies your problem. You can attempt to use launch WinZip, or whatever .ZIP application your using, with the .EXE name in place of the .ZIP filename you would normally use. For example, a hypothetical command line for unzipping a .ZIP file might be:
WinZip -u -s myfile.zip c:\myfolder
You can replace the .ZIP filename with the selfextracting .EXE to unpack it:
WinZip -u -s mysetup.exe c:\myfolder
The problem with launching an .EXE and getting it to unpack itself is you don't know ahead of time if the .EXE supports unpacking with launching, unpacking to a traget folder, or what the proper command line parameters are to get it to unpack. You can only guess at this stuff. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Hi, I am curious abt how to unzip the exe file (without extracting)in a C# program
-
Hi, I am curious abt how to unzip the exe file (without extracting)in a C# program
Read my previous post. It's got all the information you need and the pitfalls you're looking at. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Read my previous post. It's got all the information you need and the pitfalls you're looking at. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
ok yeah i tried by ur method as wzunzip c:\filename.zip c:\folder\ it really unzipped. wow but if i replace it for a cabinet extractor exe file, it asks for password what am i to do to unzip the exe file? suggestions please......
-
ok yeah i tried by ur method as wzunzip c:\filename.zip c:\folder\ it really unzipped. wow but if i replace it for a cabinet extractor exe file, it asks for password what am i to do to unzip the exe file? suggestions please......
Only you can answer that question since your the one holding the .EXE. Have you tried
Whatever.EXE /?
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome