Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Unicode
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor


VB Strings
VB Byte Array

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

Create Self-Extracting EXE with Icon, Setup File, Auto-Run, etc.

Download Chilkat Zip ActiveX

Demonstrates many of the features of using Chilkat Zip to create self-extracting executables.

Private Sub Command1_Click()

    Dim zip As New ChilkatZip2
    zip.UnlockComponent "UnlockCode"
    
    ' 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.
    ' 1 = EXE has no interface, 0 (the default) = EXE includes interface
    zip.ExeNoInterface = 1
    
    ' 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 = 1
    
    ' Initialize the Zip object and add some files.
    zip.NewZip "blahblahblah.zip"
    zip.AppendOneFileOrDir "Setup.exe", 0
    zip.AppendOneFileOrDir "hamlet.xml", 0
    zip.AppendData "something.txt", "This is data"
    
    success = zip.WriteExe("myPackage.exe")
    If (success = 0) Then
        MsgBox zip.LastErrorText
    Else
        MsgBox "Self-extracting EXE created."
    End If
    
End Sub

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.