下面是建立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 虚拟目录\n\n 例:\n http://localhost/cyclone2000/default.htm";
szoption1 = "";
szoption2 = "";
sztitle = "旋风2000安装完成";
sdfinishex(sztitle,szmsg1,szmsg2,szoption1,szoption2,bopt1,bopt2);
szcmdline = "http://localhost/cyclone2000/default.htm";
if (launchapp(programfiles ^"inte.net explorer"^"iexplore.exe", szcmdline) < 0) then
messagebox ("不能打开浏览器.",severe);
endif;
return 0;
end;
///////////////////////////////////////////////////////////////////////////////
//
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器