Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Self-Extracting Exe Creation Showing All Options
VBScript showing (almost) all available options when creating a self-extracting executable.
set zip = CreateObject("Chilkat.Zip2")
zip.UnlockComponent "anything for 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.
' 1 = EXE has no interface, 0 (the default) = EXE includes default interface window
zip.ExeNoInterface = 1
' Causes the EXE to run a program (that was contained within the EXE)
' immediately after extracting.
zip.AutoRun = "Setup.exe"
' Causes the EXE to automatically unzip to a pre-set directory.
zip.ExeUnzipDir = "c:\temp\myApp\"
' 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 "zipFilenameNotUsedBecauseAnExeIsCreated.zip"
' Refer to http://www.chilkatsoft.com/refdoc/xChilkatZip2Ref.html
' for documentation on all properties and methods.
zip.AppendOneFileOrDir "Setup.exe", 0
zip.AppendOneFileOrDir "hamlet.xml", 0
zip.AppendData "something.txt", "This is data"
zip.AppendFiles "c:/temp/a/*", 1
zip.WriteExe "myPackage.exe"
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.