谁知道用installshield安装asp时,设置虚拟目录的mkwebdir.vbs应该插到哪里吗?

zt26753130 2001-12-17 10:16:31
加精
详细情况在
http://www.csdn.net/expert/Topic/296/296905.shtm
...全文
209 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
lnmail 2002-01-14
  • 打赏
  • 举报
回复
谢谢帮忙,一定给分,我是菜鸟,
asp安装后需要自动设置iis,怎样调用odbc
谢谢
gjd111686 2002-01-12
  • 打赏
  • 举报
回复
前提是你的系统装有WScript
tripofdream 2002-01-12
  • 打赏
  • 举报
回复
两个主要文件(setup脚本和vbs脚本)都在这两个贴子里,还有就是MSDN,没有其它的文档了,我周一再把我的例子(在公司)给你发过去,自己对照着看看吧.
lnmail 2002-01-11
  • 打赏
  • 举报
回复
to:muwenyi(咔咔) and to tripofdream(梦之旅)
我因为这个问题要疯了,可以给我一份文档吗?
整个过程的文档最好了,一人给100分。

我的mail是lnmail@lnmail.net
拜托了
tripofdream 2001-12-18
  • 打赏
  • 举报
回复
回复人: tripofdream(梦之旅) (2001-9-28 10:47:20) 得0分
VBS文件可以直接在命令行下执行,所以你可以在命令行下测试.这个文件的调用格式也是没有-d参数的,
WScript.Echo "Example : mkwebdir -c MyComputer -w ""Default Web Site"""
WScript.Echo " -v ""dir1"",""c:\inetpub\wwwroot\dir1"",""dir2"",""c:\inetpub\wwwroot\dir2"""
这个提示中的例子格式才是正确的,也就是
mkwebdir.vbs -c myComputer -w 1(表示第一个站点) -v "vdir1","c:\inetpub\wwwroot\dir1"[,"vdir2","c:\inetpub\wwwroot\dir2",......]
而上面的
'Example 1 mkwebdir -c MyComputer -w "Default Web Site" -v "Virtual Dir1" -d"c:\inetpub\wwwroot\dir1"
中的例子是不正确的.

这个文件不是插到安装脚本中的,而是用命令行调用的(如下):
//////////////////////////////////////////////////////////////////////////////
//
// 函数: 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 (< 0) then
MessageBox ("不能建立WEB 虚拟目录.",SEVERE);
endif;

注意
LaunchAppAndWait("WScript.exe", szCmdLine,WAIT) 这一句,就是用WScript.exe来调用vbs文件的.
zt26753130 2001-12-18
  • 打赏
  • 举报
回复
多谢,多谢了
tripofdream 2001-12-18
  • 打赏
  • 举报
回复
确认mkwebdir.vbs已经拷贝到安装目录(在components面板中将mkwebdir.vbs所在的File Group包含进去).
tripofdream 2001-12-18
  • 打赏
  • 举报
回复

////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
// Comments: This template script performs a basic setup. With minor
// modifications, this template can be adapted to create
// new, customized setups.
//
////////////////////////////////////////////////////////////////////////////////


// Include header files

#include "ifx.h" //DO NOT REMOVE

////////////////////// string defines ////////////////////////////

//////////////////// installation declarations ///////////////////

// ----- DLL function prototypes -----


// your DLL function prototypes


// ---- script function prototypes -----


// your script function prototypes

// your global variables



//////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnFirstUIBefore
//
// EVENT: 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 szDir;
STRING szfolder;
STRING szComponents, szTargetdir;
NUMBER nLevel;

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));

//默认值设定
TARGETDIR = "C:\\Inetpub\\wwwroot\\WebApp";
szDir = TARGETDIR;
SHELL_OBJECT_FOLDER = @FOLDER_NAME;
svName = "Daniel";
svCompany = "N/A";
svSerial = "111-1111111";

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_SdRegisterUserEx:
szMsg = "";
szTitle = "";
nResult = SdRegisterUserEx( szTitle, szMsg, svName, svCompany, svSerial );
//验证序列号
if (svSerial !="111-1111111") then
MessageBox ("InValid Serial!",WARNING);
goto Dlg_SdRegisterUserEx;
endif;
if (nResult = BACK) goto Dlg_SdLicense;

Dlg_SdAskDestPath:
szTitle = "";
szMsg = "";
nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
TARGETDIR = szDir;
if (nResult = BACK) goto Dlg_SdRegisterUserEx;

Dlg_SdComponentTree:
if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath;
szTitle = "";
szMsg = "";
szTargetdir = TARGETDIR;
szComponents = "";
nLevel = 2;
if (nSetupType = CUSTOM) then
nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel);
if (nResult = BACK) goto Dlg_SdAskDestPath;
endif;

Dlg_SdSelectFolder:
szfolder = SHELL_OBJECT_FOLDER;
szTitle = "";
szMsg = "";
nResult = SdSelectFolder( szTitle, szMsg, szfolder );
SHELL_OBJECT_FOLDER = szfolder;
if (nResult = BACK) goto Dlg_SdComponentTree;


// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);

return 0;

end;

//////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnFirstUIAfter
//
// EVENT: 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 = TARGETDIR ^"mkwebdir.vbs "+"-c localhost -w 1 -v WebApp," + TARGETDIR ;
if (LaunchAppAndWait("WScript.exe", szCmdLine,WAIT) < 0) then
MessageBox ("不能建立WEB 虚拟目录.",SEVERE);
endif;
Disable(STATUSEX);
bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MSG1);
szMsg2 = "";
szOption1 = "";
szOption2 = "";
szTitle = "";
SdFinishEx(szTitle,szMsg1,szMsg2,szOption1,szOption2,bOpt1,bOpt2);
return 0;
end;

//////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnMaintUIBefore
//
// EVENT: MaintUIBefore event is sent when end user runs installation that
// has already been installed on the machine. Usually this happens
// through Add/Remove Programs applet. In the handler installation
// usually displays UI allowing end user to modify existing installation
// or uninstall application. After this function returns,
// ComponentTransferData is called to perform file transfer.
//
///////////////////////////////////////////////////////////////////////////////
function OnMaintUIBefore()
NUMBER nResult,nLevel,nType;
STRING szTitle,szMsg,svDir,szComponents,svResult,szCaption;
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 );
// SetColor(BACKGROUND,RGB (0, 128, 128));
// Enable( FULLWINDOWMODE );
// Enable( BACKGROUND );

nType = MODIFY;

Dlg_Start:
Disable(BACKBUTTON);
nResult = SdWelcomeMaint(szTitle, szMsg, nType);
Enable(BACKBUTTON);

Dlg_SdComponentTree:
if (nResult = MODIFY) then
szTitle = "";
szMsg = "";
svDir = TARGETDIR;
szComponents = "";
nLevel = 2;
nResult = SdComponentTree(szTitle, szMsg, svDir, szComponents, nLevel);
if (nResult = BACK) goto Dlg_Start;
// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);

elseif (nResult = REMOVEALL) then
svResult = SdLoadString(IFX_MAINTUI_MSG);
szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
if (nResult = IDCANCEL) then
goto Dlg_Start;
elseif(nResult = IDOK) then
// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);

//-->Remove all components
ComponentRemoveAll();
endif;
elseif (nResult = REPAIR) then
// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100);

//-->Reinstall Logged Components
ComponentReinstall();
endif;

end;



///////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnMaintUIAfter
//
// EVENT: MaintUIAfter event is sent after file transfer, when end user runs
// installation that has already been installed on the machine. Usually
// this happens through Add/Remove Programs applet.
// In the handler installation usually displays UI that will inform
// end user that maintenance/uninstallation has been completed successfully.
//
///////////////////////////////////////////////////////////////////////////////
function OnMaintUIAfter()
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
NUMBER bOpt1, bOpt2;
begin
Disable(STATUSEX);
bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MAINT_MSG1);
szMsg2 = "";
szOption1 = "";
szOption2 = "";
szTitle = SdLoadString(IFX_SDFINISH_MAINT_TITLE);
SdFinishEx(szTitle,szMsg1,szMsg2,szOption1,szOption2,bOpt1,bOpt2);
return 0;
end;

///////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: OnMoving
//
// EVENT: Moving event is sent when file transfer is started as a result of
// ComponentTransferData call, before any file transfer operations
// are performed.
//
///////////////////////////////////////////////////////////////////////////////
function OnMoving()
STRING szAppPath;
begin
// Set LOGO Compliance Application Path
// TO DO : if your application .exe is in a subfolder of TARGETDIR then add subfolder
szAppPath = TARGETDIR;
RegDBSetItem(REGDB_APPPATH, szAppPath);
RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY);

end;

// --- include script file section ---


fivestars 2001-12-18
  • 打赏
  • 举报
回复
梦之旅再帮一把吧
fivestars 2001-12-18
  • 打赏
  • 举报
回复
关注!
zt26753130 2001-12-18
  • 打赏
  • 举报
回复
我就是用了上次你回答的解决方法。现在问题有
1。安装时程序提示mkwebdir.vbs找不到,但是这个文件我们已经放到File Group中了
2。能否将你的IS63成功的例子中拷贝给我们一个完整的IS脚本文件,上次你的那个脚本文件好像不完全,我们编译时出现很多错误
多谢!分不够我们可以再加。

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧