Package ASP program with InstallShield

Source: Internet
Author: User
Tags file copy goto iis
Installshield| Program | Package #include "ifx.h"//cannot be moved
Packaging and automatic installation of ASP software with InstallShield
Original Author: Jia Jun (Jaron)
First published in NetEase, Chinaasp,asphouse
1. File copy
2. Optional automatic set up Independent site run (set up IIS)
3. Optional Automatic Setup virtual site run (set up IIS)
4. Set directory readable, writable and run scripts
5. Automatically create ODBC
6. Automatically create or attach an MDF-formatted SQL database and optimize
7. Automatically install Scriptencode decoder program
This article lists only the Script parts of InstallShield, as well as two VBS files and other settings
Any questions during the test, please come to Http:// programming Space Edition Discussion
Prototype CreateDatabase (string,string,string);
Prototype Createwebsite (string,string); Create an IIS site
Prototype Createvirtualdir (STRING); Create a virtual directory

Function: Onfirstuibefore
Event: Firstuibefore event is sent when installation was run for the
Time on given machine. In the handler installation usually displays
UI allowing end user to specify installation parameters. After this
function returns, Componenttransferdata is called to perform file
function Onfirstuibefore ()
Number Nresult,nsetuptype,nopt,svedit1,svedit2;
STRING SzTitle, Szmsg,szbmppath;
STRING Szlicensefile, szquestion;
STRING Szserverip,szserverport,szserveripdefault,szserverportdefault;
STRING szsqlsvr,szsqlusr,szsqlpwd,svsqlsvr,svsqlusr,svsqlpwd;
STRING svname, Svcompany, svserial;
STRING Szfile,sztargetpath,szdir,szfolder;
STRING szcomponents, Sztargetdir;
STRING szfield1,szfield2;
STRING Szdefault,svresult;
OBJECT Piisobj;
LIST list,liststartcopy;
Number nlevel,nvsize;

Szbmppath= "C:" ^ "temp" ^ "left.bmp";
Dialogsetinfo (Dlg_info_altimage, Szbmppath, TRUE); Set the picture on the left
To do:if your want to enable background, window title, and caption bar title
Settitle (@TITLE_MAIN, white);
Settitle (@TITLE_CAPTIONBAR, 0, backgroundcaption);
Enable (Fullwindowmode);
SetColor (Background,rgb (0, 128, 128));

Default Value setting
TARGETDIR = "C:" ^ "inetpub" ^ "Jaronsoft" ^ @FOLDER_NAME;
Shell_object_folder = @FOLDER_NAME;
svname = "Beta user";
Svcompany = "Jdinfo network";
svserial = "111-1111111";

Beginning of Dialogs label

Dlg_sdwelcome://Welcome dialog box
SzTitle = "Welcome to enter";
szmsg = "";
Nresult = SdWelcome (SzTitle, szmsg);
if (nresult = back) goto Dlg_start;

dlg_sdlicense://Software License Agreement dialog box
Szlicensefile = supportdir ^ "License.txt";
SzTitle = "License Agreement";
szmsg = "";
Szquestion = "";
Nresult = SdLicense (SzTitle, szmsg, Szquestion, szlicensefile);
if (nresult = back) goto dlg_sdwelcome;

Dlg_sdshowinfolist://readme file dialog box
Szfile = supportdir ^ "Infolist.txt";
List = Listcreate (stringlist);
Listreadfromfile (list, szfile);
SzTitle = "README";
szmsg = "";
Nresult = Sdshowinfolist (szTitle, szmsg, list);
Listdestroy (list);
if (nresult = back) goto dlg_sdlicense;

dlg_sdregisteruserex://User Information dialog box
szmsg = "";
SzTitle = "User Information";
Nresult = Sdregisteruserex (SzTitle, szmsg, Svname, Svcompany, svserial);
if (nresult = back) goto dlg_sdshowinfolist;
Check serial number
if (Chk_serial (Svcompany, svserial) <0) Then
Goto Dlg_sdregisteruserex;
Check Serial number complete
DLG_SDASKDESTPATH://Installation Location dialog box
SzTitle = "Check serial number";
szmsg = "";
Nresult = Sdaskdestpath (SzTitle, szmsg, szdir, 0);
if (nresult = back) goto Dlg_sdregisteruserex;

Dlg_setuptype://Installation Type dialog box
Nsetuptype = typical;
SzTitle = "Installation Type";
szmsg = "Please choose which way you need to install";
Nresult = SetupType (SzTitle, szmsg, "", Nsetuptype, 0);
if (nresult = back) Then
Goto Dlg_sdaskdestpath;
Nsetuptype = Nresult;
if (Nsetuptype!= CUSTOM) Then
Sztargetpath = TARGETDIR;
nvsize = 0;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.