A Self-extracting Installer
How to create a self extracting multi-installation Installer.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lalit MPosted Jan 2, 2013, 3:47 AM
Here source code of self extracting using winzip file
private void button1_Click(object sender, System.EventArgs e)
{
Chilkat.Zip zip = new Chilkat.Zip();
zip.UnlockComponent("30-day trial");
// Set this property to use an icon for the EXE that is created.
zip.ExeIconFile = "box.ico";
// Use this property to automatically unzip when the EXE is double-clicked.
// True = EXE has no interface, False (the default) = EXE includes interface
zip.ExeNoInterface = true;
// Causes the EXE to automatically unzip to a pre-set directory.
zip.ExeUnzipDir = "c:\\temp\\myApp";
// Causes the EXE to run a program (that was contained within the EXE)
// immediately after extracting.
zip.AutoRun = "Setup.exe";
// Parameters can be passed to the AutoRun program.
zip.AutoRunParams = "-x -a -b";
// Causes the creation of an EXE that has no interface,
// and automatically selects a temporary directory for
// unzipping.
//zip.AutoTemp = true;
// Initialize the Zip object and add some files.
zip.NewZip("blahblahblah.zip"); // <-- This is the file that would be written if WriteZip were called.
zip.AppendOneFileOrDir("Setup.exe",false);
zip.AppendOneFileOrDir("hamlet.xml",false);
// Create the self-extracting EXE.
bool success = zip.WriteExe("myPackage.exe");
if (!success)
{
MessageBox.Show(zip.LastErrorText);
}
else
{
MessageBox.Show("Created SFX!");
}
}
Using Winrar go through this link
--------------------------------
http://vamsee-konda.blogspot.in/2012/01/creating-self-executing-installer-with.html