Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
Create EXE that Downloads Zip from URL and Extracts
Creates an EXE that downloads a .zip from a URL and extracts. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set zip = Server.CreateObject("Chilkat_9_5_0.Zip") ' Any string unlocks the component for the 1st 30-days. success = zip.UnlockComponent("Anything for 30-day trial") If (success <> 1) Then Response.Write zip.LastErrorText & "<br>" End If ' This example creates a .exe that downloads the .zip from ' http://www.chilkatsoft.com/testData/testWithSetup.zip, ' unzips it, and runs the setup.exe contained within. ' This is an actual URL that can be tested. The setup.exe ' is a do-nothing program that simply displays a dialog box ' with an "OK" button. zip.ExeSourceUrl = "http://www.chilkatsoft.com/testData/testWithSetup.zip" ' Set the AutoTemp property to create an EXE that ' extracts to an auto-chosen temp directory: zip.AutoTemp = 1 ' Indicate the file within the .zip that should be run after ' extraction: ' Note: You may download the .zip at http://www.chilkatsoft.com/testData/testWithSetup.zip ' and examine it. You'll see that the "setup.exe" has a path ' within the .zip, therefore you must specify the path as it ' exists within the .zip: zip.AutoRun = "bin/setup.exe" ' Indicate that we do not want a main dialog, but we *do* want ' a progress dialog. zip.SetExeConfigParam "ShowMain","0" zip.SetExeConfigParam "ShowProgress","1" ' Customize the progress dialog: zip.SetExeConfigParam "ProgressTitle","This is the progress dialog title" zip.SetExeConfigParam "ProgressCaption","This is the progress dialog caption" ' Write "mySfx.exe" success = zip.WriteExe("mySfx.exe") If (success <> 1) Then Response.Write zip.LastErrorText & "<br>" End If Response.Write "EXE Created!" & "<br>" %> </body> </html> |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.