InstallShield製作ASP安裝程式(3)
看人家用使用InstallShield製作ASP安裝程式(3)
(文件類別:) 2002-2-5
下面是建立WEB檔案和設定的例子需VBS檔案(有虛擬目錄設定,但沒有許可權設定). //////////////////////////////////////////////////////////////////////////////// // // IIIIIII SSSSSS // II SS InstallShield (R) // II SSSSSS (c) 1996-1999, InstallShield Software Corporation // II SS (c) 1990-1996, InstallShield Corporation // IIIIIII SSSSSS All Rights Reserved. // // // This code is generated as a starting setup template. You should // modify it to provide all necessary steps for your setup. // // // 檔名: Setup.rul // // 描述: InstallShield script // // 註釋: This template script performs a basic setup. With minor // modifications, this template can be adapted to create // new, customized setups. // //////////////////////////////////////////////////////////////////////////////// // 包含的標頭檔案 #include "ifx.h" //不能移動 ////////////////////// string defines //////////////////////////// //////////////////// installation declarations /////////////////// // ----- DLL function prototypes ----- // your DLL function prototypes // ---- script function prototypes ----- // your script function prototypes prototype CHK_serial(STRING,STRING); prototype RegODBC(STRING); prototype set_vod_liveaddress(); // your global variables STRING szvodservername; STRING szliveservername; ////////////////////////////////////////////////////////////////////////////// // // 函式: OnFirstUIBefore // // 事件: FirstUIBefore event is sent when installation is run for the first // 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 // transfer. // /////////////////////////////////////////////////////////////////////////////// function OnFirstUIBefore() NUMBER nResult,nSetupType; STRING szTitle, szMsg; STRING szLicenseFile, szQuestion; STRING svName, svCompany, svSerial; STRING szFile; STRING szTargetPath; STRING szDir; STRING szfolder; STRING szComponents, szTargetdir; //zy STRING szDefault,svResult; STRING sDBSERVERNAME; OBJECT piisObj; //zy NUMBER nLevel; LIST listStartCopy; LIST list; NUMBER nvSize; STRING msg; begin //To Do: if you want to enable background, window title, and caption bar title // SetTitle( @TITLE_MAIN, 24, WHITE ); // SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Enable( FULLWINDOWMODE ); // Enable( BACKGROUND ); // SetColor(BACKGROUND,RGB (0, 128, 128)); nSetupType = TYPICAL; TARGETDIR = "D:"^"cyclone2000"; szDir = TARGETDIR; SHELL_OBJECT_FOLDER = @FOLDER_NAME; svName = ""; svCompany = ""; svSerial = ""; Dlg_Start: // beginning of dialogs label Dlg_SdWelcome: //歡迎 對話方塊 szTitle = ""; szMsg = ""; nResult = SdWelcome( szTitle, szMsg ); if (nResult = BACK) goto Dlg_Start; Dlg_SdLicense://軟體許可協議 對話方塊 szLicenseFile = SUPPORTDIR ^ "license.txt"; szTitle = ""; szMsg = ""; szQuestion = ""; nResult = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile ); if (nResult = BACK) goto Dlg_SdWelcome; Dlg_SdShowInfoList://readme檔案 對話方塊 szFile = SUPPORTDIR ^ "infolist.txt"; list = ListCreate( STRINGLIST ); ListReadFromFile( list, szFile ); szTitle = ""; szMsg = ""; nResult = SdShowInfoList( szTitle, szMsg, list ); ListDestroy( list ); if (nResult = BACK) goto Dlg_SdLicense; Dlg_SdRegisterUserEx://使用者資訊 對話方塊 szMsg = ""; szTitle = ""; nResult = SdRegisterUserEx( szTitle, szMsg, svName, svCompany, svSerial ); if (nResult = BACK) goto Dlg_SdShowInfoList; //檢查序列號 if (CHK_serial(svCompany, svSerial)<0) then goto Dlg_SdRegisterUserEx; endif; //檢查序列號完畢 Dlg_SdAskDestPath://安裝位置 對話方塊 szTitle = ""; szMsg = ""; nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 ); TARGETDIR = szDir; if (nResult = BACK) goto Dlg_SdRegisterUserEx; Dlg_SetupType: //安裝型別 對話方塊 szTitle = ""; szMsg = ""; nResult = SetupType ( szTitle , szMsg , "" , nSetupType , 0 ); if (nResult = BACK) then goto Dlg_SdAskDestPath; else nSetupType = nResult; if (nSetupType != CUSTOM) then szTargetPath = TARGETDIR; nvSize = 0; ComponentCompareSizeRequired(MEDIA,szTargetPath,nvSize); if (nvSize != 0) then MessageBox( szSdStr_NotEnoughSpace, WARNING ); goto Dlg_SetupType; endif; endif; endif; Dlg_SdComponentTree: //對話方塊 if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType; szTitle = ""; szMsg = ""; szTargetdir = TARGETDIR; szComponents = ""; nLevel = 2; if (nSetupType = CUSTOM) then nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel); if (nResult = BACK) goto Dlg_SetupType; endif; Dlg_SdSelectFolder://對話方塊 szfolder = SHELL_OBJECT_FOLDER; szTitle = ""; szMsg = ""; nResult = SdSelectFolder( szTitle, szMsg, szfolder ); SHELL_OBJECT_FOLDER = szfolder; if (nResult = BACK) goto Dlg_SdComponentTree; Dlg_AskText ://設定資料庫伺服器 對話方塊 szTitle = "設定資料庫伺服器"; szMsg = ""; szQuestion="請輸入SQL SERVER(旋風2000)資料庫伺服器的主機名或IP地址"; szDefault="192.168.0.1"; SetDialogTitle(DLG_ASK_TEXT,szTitle); nResult = AskText (szQuestion, szDefault, svResult); sDBSERVERNAME = svResult; if (nResult = BACK) goto Dlg_SdSelectFolder; RegODBC(sDBSERVERNAME); Dlg_SdStartCopy://開始複製檔案 對話方塊 szTitle = ""; szMsg = ""; listStartCopy = ListCreate( STRINGLIST ); //The following is an example of how to add a string(svName) to a list(listStartCopy). //eg. ListAddString(listStartCopy,svName,AFTER); nResult = SdStartCopy( szTitle, szMsg, listStartCopy ); ListDestroy(listStartCopy); if (nResult = BACK) goto Dlg_AskText; // setup default status SetStatusWindow(0, ""); Enable(STATUSEX); StatusUpdate(ON, 100); return 0; end; ////////////////////////////////////////////////////////////////////////////// // // 函式: OnFirstUIAfter // // 事件: FirstUIAfter event is sent after file transfer, when installation // is run for the first time on given machine. In this event handler // installation usually displays UI that will inform end user that // installation has been completed successfully. // /////////////////////////////////////////////////////////////////////////////// function OnFirstUIAfter() STRING szTitle, szMsg1, szMsg2, szOption1, szOption2,szCmdLine; NUMBER bOpt1, bOpt2; begin szCmdLine = SUPPORTDIR ^"mkwebdir.vbs "+"-c LocalHost -w 1 -v cyclone2000 -d "+ TARGETDIR ; if (LaunchAppAndWait("WScript.exe", szCmdLine,WAIT) < 0) then MessageBox ("不能建立WEB 虛擬目錄.",SEVERE); endif; set_vod_liveaddress(); szCmdLine = SUPPORTDIR ^"odbc.reg"; if (LaunchAppAndWait("regedit.exe", szCmdLine,WAIT) < 0) then MessageBox ("不能配置ODBC.",SEVERE); endif; Disable(STATUSEX); bOpt1 = FALSE; bOpt2 = FALSE; szMsg1 = SdLoadString(IFX_SDFINISH_MSG1); szMsg2 = "請瀏覽本主機WEB伺服器上的 cyclone2000 虛擬目錄nn 例:n szOption1 = ""; szOption2 = ""; szTitle = "旋風2000安裝完成"; SdFinishEx(szTitle,szMsg1,szMsg2,szOption1,szOption2,bOpt1,bOpt2); szCmdLine = " if (LaunchApp(PROGRAMFILES ^"Internet Explorer"^"IEXPLORE.EXE", szCmdLine) < 0) then MessageBox ("不能開啟瀏覽器.",SEVERE); endif; return 0; end; /////////////////////////////////////////////////////////////////////////////// // |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/631872/viewspace-823710/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- InstallShield製作ASP安裝程式(6)
- InstallShield製作ASP安裝程式(5)
- InstallShield製作ASP安裝程式(4)
- InstallShield製作ASP安裝程式(2)
- InstallShield製作ASP安裝程式(1)
- InstallShield X製作安裝程式
- InstallShield製作升級安裝包
- InstallShield Express for delphi製作安裝程式定製BDE引擎 (轉)Express
- 製作asp.net的安裝程式ASP.NET
- Installshield製作更新安裝包
- InstallShield6.3安裝檔案製作要點 (轉)
- 教你如何製作程式安裝包
- InstallShield中如何製作靜默安裝包-IntallScript或InstallScript MSI工程型別型別
- 自己編寫安裝製作程式 (轉)
- java 應用程式 安裝程式製作(要帶jvm)JavaJVM
- 使用NSIS製作安裝包
- Redhat kickstart 安裝光碟製作Redhat
- RedHat DVD安裝盤製作Redhat
- 升級安裝包的製作
- win10怎麼製作安裝u盤_win10安裝U盤製作教程Win10
- U盤如何製作win10安裝盤|win10安裝U盤製作方法Win10
- DMG Canvas 4.0.7 DMG安裝包製作Canvas
- Mac OS製作Ubuntu安裝U盤MacUbuntu
- 製作iPhone PXL安裝包的方法iPhone
- Mac 製作 win10 安裝盤MacWin10
- 隨身碟如何製作win10安裝盤|win10安裝隨身碟製作方法Win10
- 製作yum源及安裝賽門鐵克
- Debian安裝包的簡單製作
- 7z製作自解壓安裝包
- 本地yum庫製作及本地安裝DockerDocker
- Python 模組的製作,釋出,安裝Python
- 《ASP網頁製作教程》筆記網頁筆記
- 怎樣製作win10的iOS映象安裝U盤_製作win10 iso映象安裝U盤教程Win10iOS
- 如何製作python安裝模組(setup.py)Python
- VS2010 製作安裝包
- 系統安裝引導盤的製作(轉)
- Windows CE/Pocket PC安裝盤的製作 (轉)Windows
- linux製作安裝包的兩種方法Linux