Packaging of ASP software and automatic database installation with INSTALLSHIELD9

Source: Internet
Author: User
Tags goto iis sql string
installshield| Packing | data | database | Automatic installation |installshield| Packing | Automatic installation/The recent company uses ASP+SQL to develop office automation OA, need to make installation program release, This script is made with IS9.0 to share and learn from all the colleagues.
#define BITMAP_ID 1

#include "ifx.h"//cannot be moved

Prototype Createwebsite (string,string); Create an IIS site
Prototype Createvirtualdir (STRING); Create a virtual directory
Prototype CreateDatabase (string,string,string);//Create SQL database
Prototype Checkiis (); Example: Check to see if the system installs IIS

STRING Tmp_product_name,tmp_product_version,tmp_company_name,tmp_product_key,tmp_title_captionbar;
STRING GLOBALSTR,DESTDIR,DESTSVR,DESTSA,DESTPW;
Number Nvfilehandle,nvfilehandlebak,asaline;
BOOL Iscreatedb;
STRING Nsetuptype,szsqlsvr,szsqlusr,szsqlpwd,szsqlsvrdefault,szsqlusrdefault,szsqlpwddefault;
STRING Szadsvr,szadusr,szadpwd,szadsvrdefault,szadusrdefault,szadpwddefault;
STRING SZADDOMAIN,SZADOU,SZADDOMAINDEFAULT,SZADOUDEFAULT,ADDC1;
STRING svname, Svcompany, svserial;

function Onfirstuibefore ()

Number Nresult,nopt,svedit1,svedit2;
STRING SzTitle, Szmsg,szbmppath;
STRING Szlicensefile, szquestion;
STRING Szserverip,szserverport,szserveripdefault,szserverportdefault;

STRING Szfile,sztargetpath,szdir,szfolder;
STRING szcomponents, Sztargetdir;
STRING szfield1,szfield2;
STRING Szdefault,svresult;
OBJECT Piisobj;
LIST list,liststartcopy;
Number nlevel,nvsize;

Begin

Tmp_product_name= "XXX e-government platform";
Tmp_product_version= "V2.0";
Tmp_company_name= "xxx Company";
Tmp_product_key= "88888888";
tmp_title_captionbar= "0";

szbmppath=supportdir^ "Left.bmp";
Dialogsetinfo (Dlg_info_altimage, Szbmppath, FALSE); 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);
Enable (BACKGROUND);
SetColor (Background,rgb (0, 128, 128));
Placebitmap (Szbmppath, bitmap_id, 0, 0, fullscreen);

Default Value setting
TARGETDIR = "C:" ^ "inetpub" ^ @FOLDER_NAME;
Szdir = TARGETDIR;
Shell_object_folder = @FOLDER_NAME;
Svname = "";
Svcompany = "";
svserial = "88888888";

if (Checkiis () ==1) then//example: Check if the system has IIS installed
MessageBox ("IIS already installed, install continue!") ", SEVERE);
Goto Dlg_start;
Else
MessageBox ("This system does not have IIS installed, please install iis! first ", WARNING);
Goto end_all_install;//End Installation
endif


dlg_start://Start dialog box

Dlg_sdwelcome://Welcome dialog box
SzTitle = "Welcome to install the use of" +tmp_product_name+ "" +tmp_product_version;
szmsg = "";
Nresult = SdWelcome (SzTitle, szmsg);
if (nresult = back) goto Dlg_start;

dlg_sdlicense://Software License Agreement dialog box
Szlicensefile = supportdir ^ "License.txt";
SzTitle = "End User 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 = "System Information Overview";
szmsg = "System Overview";
Nresult = Sdshowinfolist (szTitle, szmsg, list);
Listdestroy (list);
if (nresult = back) goto dlg_sdlicense;

dlg_sdregisteruserex://User Information dialog box
szmsg = "";
SzTitle = "User Information registration";
Svcompany = "xxx province";
svserial = "xxx Unit";
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;
endif
Check Serial number complete

dlg_inputadadmin://set the IP and user name of the ad directory server

SzTitle = "Set up directory (AD) server";
szmsg = "Start now to set up the directory (AD) server IP, Administrator account and password";
szquestion= "Please enter an Administrator account and password for the directory (AD) server, and setup will configure it according to the IP address, account number, and password you provide." If you provide an incorrect account number or password, the system will not be used properly! ";
Szadsvr= "IP address:";
Szadusr= "account number:";
szadpwd= "Password:";
szadsvrdefault= "192.168.8.8";
szadusrdefault= "Administrator";
Szadpwddefault= "";
Setdialogtitle (Dlg_ask_text,sztitle);
Nresult=sdshowdlgedit3 (SzTitle, Szquestion,szadsvr,szadusr,szadpwd,szadsvrdefault



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: info-contact@alibabacloud.com 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.