正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- prototype CreateWebSite(STRING,STRING); // 创建 IIS 站点
- prototype CreateVirtualDir(STRING); // 创建虚拟目录
-
- //////////////////////////
- // 创建IIS站点
- //////////////////////////
- function CreateWebSite(szServerIPDefault,szServerPortDefault)
- STRING szCmdLine,szWaitTxt;
- begin
- if ((szServerIPDefault = "") || (szServerPortDefault = "")) then
- MessageBox ("您没有设定/""+@PRODUCT_NAME+"/"运行的服务器IP地址或端口!!IIS信息服务设置失败!/n请自行创建IIS站点,并将主目录设为:"+TARGETDIR,SEVERE);
- else
- szWaitTxt=" 正在创建IIS和设置站点....";
- SdShowMsg (szWaitTxt, TRUE);
- Delay(2);
- //CScript.Exe //H:CScript
- //LaunchAppAndWait("","CScript.Exe //H:Wscript ",WAIT); "Wscrīpt.exe"
- szCmdLine = SUPPORTDIR ^"mkw3site.vbs"+" -r /""+TARGETDIR+"//WebSite/" -i "+szServerIPDefault+" -o "+szServerPortDefault+" -t "+@PRODUCT_NAME;
- if (LaunchAppAndWait("Wscript.exe", szCmdLine,WAIT) < 0) then
- MessageBox ("不能建立WEB 虚拟目录,没有找到 Wscrīpt.exe 或执行脚本错误.",SEVERE);
- endif;
- SdShowMsg (szWaitTxt, FALSE);
- endif;
- return 0;
- end;
-
- //////////////////////////
- // 创建虚拟目录
- //////////////////////////
- function CreateVirtualDir(VirtualFolder)
- STRING szCmdLine,szWaitTxt;
- begin
- if (VirtualFolder = "") then
- MessageBox ("没能读取到虚拟目录的名称!请联系系统供应商!"+TARGETDIR,SEVERE);
- else
- szWaitTxt=" 正在创建/""+@PRODUCT_NAME+"/"的虚拟目录....";
- SdShowMsg (szWaitTxt, TRUE);
- Delay(2);
- szCmdLine = SUPPORTDIR ^"mkwebdir.vbs "+" -w 1 -v /""+VirtualFolder+"/",/""+ TARGETDIR+"//WebSite/"" ;
- if (LaunchAppAndWait("Wscript.exe", szCmdLine,WAIT) < 0) then
- MessageBox ("不能建立WEB 虚拟目录,没有找到 Wscrīpt.exe 或执行脚本错误.",SEVERE);
- endif;
- SdShowMsg (szWaitTxt, FALSE);
- endif;
- return 0;
- end;
复制代码 引用此方法,在OnFirstUIBefore方法的最后
- CreateWebSite(szIp,"8080"); // 开始创建 IIS 站点
- reateVirtualDir("MyWebSite"); // 开始创建 IIS 站点
复制代码
|