看人家用使用InstallShield制作ASP安装程序(6)

2016-01-29 20:17 10 1 收藏

看人家用使用InstallShield制作ASP安装程序(6),看人家用使用InstallShield制作ASP安装程序(6)

【 tulaoshi.com - ASP 】

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

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

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;

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/asp/)

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 = F

来源:https://www.tulaoshi.com/n/20160129/1510953.html

延伸阅读
标签: ASP
  下面是建立WEB文件和设置的例子需VBS文件(有虚拟目录设置,但没有权限设置). //////////////////////////////////////////////////////////////////////////////// // // IIIIIII SSSSSS // II SS InstallShield (R) // II SSSSSS (c) 1996-1999, InstallShield Software Corporation // II SS (c) 1990-1996, InstallShield Corpor...
标签: ASP
  //////////////////////////////////////////////////////////////////////////////// //                                      &...
标签: ASP
#include "ifx.h" //不能移动 ////////////////////////////////////////////////////////////////////////////// // 用InstallShield 进行 ASP 软件的打包和自动安装 // 原创作者: 贾俊 (Jaron) // 网址: http://www.jiangdu.net // 邮件: jaron@jdinfo.net // 首次发表于网易,ChinaASP,ASPHouse //////////////////////////////////////////...
标签: ASP
如何使用ASP制作类似安装向导的页面? 面临的主要问题何在: 1。界面和一个Windows Wizard完全一样,有Next和Back按钮 2。用户可以使用Back按钮回到以前的任何一步,并且能够改变以前任何一步中已经选择的内容 3。form必须记住所有填入的内容 4。不能够使用数据库 5。不能够使用Sessions,防止如果Sessiosn失效后用户的所有输入丢失,不幸的是,...
标签: ASP
  前几天大哥对我说,使用asp真麻烦,编译环境实在是差劲,他总是在vb里面写好调试好代码然后在把代码粘贴到asp程序中,为此,我在这提出一个解决之道。使用VB接替ASP所有的对象,在VB中编写纯粹的ASP程序。 大家应该都知道,其实asp中的好多组件都是使用VB编写出来的,但是让大家感到很不方便的是如何使用asp固有的几个组件,例如Re...

经验教程

509

收藏

95
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部