?? 用installshield 進(jìn)行 asp 軟件的打包和自動(dòng)安裝.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://www.abc800.com/news/artdetail.asp?id=875 -->
<HTML><HEAD><TITLE>用InstallShield 進(jìn)行 ASP 軟件的打包和自動(dòng)安裝</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR><LINK
href="用InstallShield 進(jìn)行 ASP 軟件的打包和自動(dòng)安裝.files/putong_1t" rel=StyleSheet
type=text/css>
<SCRIPT language=javascript
src="用InstallShield 進(jìn)行 ASP 軟件的打包和自動(dòng)安裝.files/fun_Script.js"></SCRIPT>
</HEAD>
<BODY background="用InstallShield 進(jìn)行 ASP 軟件的打包和自動(dòng)安裝.files/r_bg.gif">
<P align=center><BR></P>
<TABLE align=center class=tableFrame height=311 width="90%">
<TBODY>
<TR align=middle>
<TD align=right bgColor=#decbad class=listcelltitle height=274 vAlign=top
width=717>
<P align=center><BR><FONT color=#000000
style="FONT-SIZE: 14px"></FONT><FONT color=#000080
style="FONT-SIZE: 14px"><B>用InstallShield 進(jìn)行 ASP
軟件的打包和自動(dòng)安裝</B></FONT><FONT color=#000000 style="FONT-SIZE: 14px"><BR></P>
<P align=right>更新日期:2002-11-5 閱讀次數(shù):1579</FONT></P>
<P align=left style="FONT-SIZE: 14px">#include "ifx.h"
//不能移動(dòng)<BR>//////////////////////////////////////////////////////////////////////////////<BR>//
用InstallShield 進(jìn)行 ASP 軟件的打包和自動(dòng)安裝 <BR>// 原創(chuàng)作者: 賈俊 (Jaron)<BR>// 網(wǎng)址:
http://www.jiangdu.net<BR>// 郵件: jaron@jdinfo.net<BR>//
首次發(fā)表于網(wǎng)易,ChinaASP,ASPHouse<BR>//////////////////////////////////////////////////////////////////////////////<BR>//
功能:<BR>// 1.文件復(fù)制<BR>// 2.可選自動(dòng)設(shè)置獨(dú)立站點(diǎn)運(yùn)行(設(shè)置IIS)<BR>//
3.可選自動(dòng)設(shè)置虛擬站點(diǎn)運(yùn)行(設(shè)置IIS)<BR>// 4.設(shè)置目錄可讀,可寫及可運(yùn)行腳本<BR>// 5.自動(dòng)創(chuàng)建ODBC<BR>//
6.自動(dòng)創(chuàng)建或附加MDF格式的SQL數(shù)據(jù)庫(kù) 并優(yōu)化<BR>// 7.自動(dòng)安裝 ScriptEncode 解碼程序<BR>// 本文僅列出了
InstallShield 的 Script 部分,還有兩個(gè) VBS 文件及其他設(shè)置<BR>// 測(cè)試過程中有任何問題,請(qǐng)來
http://www.jiangdu.net/bbs 編程空間版
討論<BR>//////////////////////////////////////////////////////////////////////////////<BR>prototype
CreateDataBase(STRING,STRING,STRING);<BR>prototype
CreateWebSite(STRING,STRING); // 創(chuàng)建 IIS 站點(diǎn)<BR>prototype
CreateVirtualDir(STRING); //
創(chuàng)建虛擬目錄<BR><BR>//////////////////////////////////////////////////////////////////////////////<BR>//
<BR>// 函數(shù): OnFirstUIBefore <BR>// <BR>// 事件: FirstUIBefore event is sent
when installation is run for the first<BR>// time on given machine. In the
handler installation usually displays<BR>// UI allowing end user to
specify installation parameters. After this<BR>// function returns,
ComponentTransferData is called to perform file<BR>// transfer.<BR>//
<BR>///////////////////////////////////////////////////////////////////////////////<BR>function
OnFirstUIBefore() <BR>NUMBER
nResult,nSetupType,nOpt,svEdit1,svEdit2;<BR>STRING szTitle,
szMsg,szBmpPath;<BR>STRING szLicenseFile, szQuestion;<BR>STRING
szServerIP,szServerPort,szServerIPDefault,szServerPortDefault;<BR>STRING
szSQLsvr,szSQLusr,szSQLpwd,svSQLsvr,svSQLusr,svSQLpwd;<BR>STRING svName,
svCompany, svSerial;<BR>STRING
szFile,szTargetPath,szDir,szfolder;<BR>STRING szComponents,
szTargetdir;<BR>STRING szField1,szField2;<BR>STRING
szDefault,svResult;<BR>OBJECT piisObj;<BR>LIST
list,listStartCopy;<BR>NUMBER nLevel,nvSize;<BR>begin
<BR><BR>szBmpPath="C:"^"temp"^"left.bmp";<BR>DialogSetInfo
(DLG_INFO_ALTIMAGE, szBmpPath, TRUE); // 設(shè)置左邊的圖片<BR>//To Do: if you want
to enable background, window title, and caption bar title <BR>//SetTitle(
@TITLE_MAIN, 24, WHITE );<BR>//SetTitle( @TITLE_CAPTIONBAR, 0,
BACKGROUNDCAPTION ); <BR>//Enable( FULLWINDOWMODE ); <BR>//Enable(
BACKGROUND ); <BR>//SetColor(BACKGROUND,RGB (0, 128, 128));
<BR><BR>//默認(rèn)值設(shè)定<BR>TARGETDIR = "C:"^"inetpub"^"JaronSoft"^@FOLDER_NAME;
<BR>szDir = TARGETDIR;<BR>SHELL_OBJECT_FOLDER = @FOLDER_NAME; <BR>svName =
"試用版用戶";<BR>svCompany = "JDinfo Network";<BR>svSerial = "111-1111111";
<BR><BR>Dlg_Start:<BR>// beginning of dialogs label<BR><BR>Dlg_SdWelcome:
//歡迎 對(duì)話框<BR>szTitle = "歡迎進(jìn)入";<BR>szMsg = "";<BR>nResult = SdWelcome(
szTitle, szMsg );<BR>if (nResult = BACK) goto
Dlg_Start;<BR><BR>Dlg_SdLicense://軟件許可協(xié)議 對(duì)話框<BR>szLicenseFile = SUPPORTDIR
^ "license.txt";<BR>szTitle = "許可協(xié)議";<BR>szMsg = "";<BR>szQuestion =
"";<BR>nResult = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile
);<BR>if (nResult = BACK) goto
Dlg_SdWelcome;<BR><BR>Dlg_SdShowInfoList://readme文件 對(duì)話框<BR>szFile =
SUPPORTDIR ^ "infolist.txt";<BR>list = ListCreate( STRINGLIST
);<BR>ListReadFromFile( list, szFile );<BR>szTitle = "README";<BR>szMsg =
"";<BR>nResult = SdShowInfoList( szTitle, szMsg, list ); <BR>ListDestroy(
list );<BR>if (nResult = BACK) goto
Dlg_SdLicense;<BR><BR>Dlg_SdRegisterUserEx://用戶信息 對(duì)話框<BR>szMsg =
"";<BR>szTitle = "用戶信息"; <BR>nResult = SdRegisterUserEx( szTitle, szMsg,
svName, svCompany, svSerial );<BR>if (nResult = BACK) goto
Dlg_SdShowInfoList;<BR>//檢查序列號(hào)<BR>//if (CHK_serial(svCompany,
svSerial)<0) then<BR>//goto
Dlg_SdRegisterUserEx;<BR>//endif;<BR>//檢查序列號(hào)完畢<BR>Dlg_SdAskDestPath://安裝位置
對(duì)話框<BR>szTitle = "檢查序列號(hào)";<BR>szMsg = "";<BR>nResult = SdAskDestPath(
szTitle, szMsg, szDir, 0 );<BR>TARGETDIR = szDir;<BR>if (nResult = BACK)
goto Dlg_SdRegisterUserEx;<BR><BR>Dlg_SetupType: //安裝類型 對(duì)話框<BR>nSetupType
= TYPICAL; <BR>szTitle = "安裝類型";<BR>szMsg = "請(qǐng)選擇您需要按哪種方式安裝"; <BR>nResult =
SetupType ( szTitle , szMsg , "" , nSetupType , 0 );<BR>if (nResult =
BACK) then<BR>goto Dlg_SdAskDestPath;<BR>else<BR>nSetupType =
nResult;<BR>if (nSetupType != CUSTOM) then<BR>szTargetPath =
TARGETDIR;<BR>nvSize =
0;<BR>ComponentCompareSizeRequired(MEDIA,szTargetPath,nvSize);<BR>if
(nvSize != 0) then <BR>MessageBox( szSdStr_NotEnoughSpace, WARNING
);<BR>goto Dlg_SetupType;<BR>endif;<BR>endif;
<BR>endif;<BR><BR>Dlg_SdComponentTree: //對(duì)話框<BR>if ((nResult = BACK)
&& (nSetupType != CUSTOM)) goto Dlg_SetupType;<BR>szTitle =
"對(duì)話框";<BR>szMsg = "";<BR>szTargetdir = TARGETDIR;<BR>szComponents =
"";<BR>nLevel = 2;<BR>if (nSetupType = CUSTOM) then<BR>nResult =
SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel);<BR>if
(nResult = BACK) goto Dlg_SetupType;
<BR>endif;<BR><BR>Dlg_SdSelectFolder://對(duì)話框<BR>szfolder =
SHELL_OBJECT_FOLDER; <BR>szTitle = "文件夾";<BR>szMsg = "";<BR>nResult =
SdSelectFolder( szTitle, szMsg, szfolder );<BR>SHELL_OBJECT_FOLDER =
szfolder;<BR>if (nResult = BACK) goto
Dlg_SdComponentTree;<BR><BR><BR>Dlg_SelMode ://設(shè)置數(shù)據(jù)庫(kù)服務(wù)器 對(duì)話框<BR>szTitle =
"設(shè)置"+@PRODUCT_NAME+"的運(yùn)行模式";<BR>szMsg =
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -