Dlg_SdStartCopy: szTitle = ""; szMsg = ""; listStartCopy = ListCreate( STRINGLIST ); //设置信息 ListAddString(listStartCopy,"你的选择如下:",AFTER); ListAddString(listStartCopy,"\n",AFTER); ListAddString(listStartCopy,"用户名:"+szName,AFTER); ListAddString(listStartCopy,"公司名称:"+szCompany,AFTER); ListAddString(listStartCopy,"\n",AFTER); ListAddString(listStartCopy,"安装路径:"+TARGETDIR,AFTER); ListAddString(listStartCopy,"\n",AFTER); ListAddString(listStartCopy,"程序组名:"+SHELL_OBJECT_FOLDER,AFTER); ListAddString(listStartCopy,"\n",AFTER); if (nSetupType = CUSTOM) then ListAddString(listStartCopy,"安装类型:"+"自定义",AFTER); elseif (nSetupType = TYPICAL) then ListAddString(listStartCopy,"安装类型:"+"典型",AFTER); elseif (nSetupType = COMPACT) then ListAddString(listStartCopy,"安装类型:"+"压缩",AFTER); endif; //结束 nResult = SdStartCopy( szTitle, szMsg, listStartCopy ); ListDestroy( listStartCopy ); if (nResult = BACK) goto Dlg_ObjDialogs; // set up default status SetStatusWindow( 0, "" ); Enable( STATUSEX ); StatusUpdate( ON, 100 ); 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 szAppPath = TARGETDIR; // TO DO: if your application's main executable file is in a subfolder of TARGETDIR then append this subfolder to szAppPath RegDBSetItem( REGDB_APPPATH, szAppPath ); RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY ); end;
to all: 谢谢回复!但我是指在InstallShield Express Limited Edition For Delphi 5中如何实现?
serial位置在:对话框—>用户信息—>设置。
有没有哪位高手用过?请指教...谢谢!
谢谢回复,但在InstallShield Express Limited Edition For Delphi 5能实现吗?
#include "ifx.h" function OnFirstUIBefore()
number nResult;
string szTitle, szMsg;
string szLicenseFile, szQuestion;
string szName, szCompany;
string szTargetPath;
string szDir;
string szfolder;
string szComponents, szTargetdir;
string svSerial;//序列号,
number svRC;//用于检查序列号
number nLevel;
LIST listStartCopy;
number nvSize, nSetupType;
begin nSetupType = TYPICAL;
TARGETDIR = PROGRAMFILES ^ @COMPANY_NAME ^ PRODUCT_PATH;
szDir = TARGETDIR;
SHELL_OBJECT_FOLDER = "智慧神软件";
szName = "";
szCompany = "";Dlg_Start:
//CheckRequirements();
//EnabledFullScreen(); 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_SdRegisterUser:
szMsg = "";
szTitle = "";
//nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany );
//检查序列号
nResult =SdRegisterUserEx (szTitle, szMsg, szName, szCompany, svSerial);
svRC=PDKey(svSerial);
if (( svRC!=1) && (nResult != BACK)) then
MessageBox ( "序列号输入错误" , WARNING );
goto Dlg_SdRegisterUser;
else
if (nResult = BACK) then
goto Dlg_SetupType;
endif;
endif;
//结束
if (nResult = BACK) goto Dlg_SdLicense;Dlg_SetupType:
szTitle = "";
szMsg = "";
nResult = SetupType ( szTitle, szMsg, "", nSetupType, 0 );
if (nResult = BACK) then
goto Dlg_SdRegisterUser;
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_SdAskDestPath:
if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType;
szTitle = "";
szMsg = "";
if (nSetupType = CUSTOM) then
nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
TARGETDIR = szDir;
if (nResult = BACK) goto Dlg_SetupType;
endif;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_ObjDialogs:
nResult = ShowObjWizardPages( nResult );
if (nResult = BACK) goto Dlg_SdComponentTree;
Dlg_SdSelectFolder:
szfolder = SHELL_OBJECT_FOLDER;
szTitle = "";
szMsg = "";
nResult = SdSelectFolder( szTitle, szMsg, szfolder );
SHELL_OBJECT_FOLDER = szfolder;
if (nResult = BACK) goto Dlg_ObjDialogs;
Dlg_SdStartCopy:
szTitle = "";
szMsg = "";
listStartCopy = ListCreate( STRINGLIST );
//设置信息
ListAddString(listStartCopy,"你的选择如下:",AFTER);
ListAddString(listStartCopy,"\n",AFTER);
ListAddString(listStartCopy,"用户名:"+szName,AFTER);
ListAddString(listStartCopy,"公司名称:"+szCompany,AFTER);
ListAddString(listStartCopy,"\n",AFTER);
ListAddString(listStartCopy,"安装路径:"+TARGETDIR,AFTER);
ListAddString(listStartCopy,"\n",AFTER);
ListAddString(listStartCopy,"程序组名:"+SHELL_OBJECT_FOLDER,AFTER);
ListAddString(listStartCopy,"\n",AFTER);
if (nSetupType = CUSTOM) then
ListAddString(listStartCopy,"安装类型:"+"自定义",AFTER);
elseif (nSetupType = TYPICAL) then
ListAddString(listStartCopy,"安装类型:"+"典型",AFTER);
elseif (nSetupType = COMPACT) then
ListAddString(listStartCopy,"安装类型:"+"压缩",AFTER);
endif;
//结束
nResult = SdStartCopy( szTitle, szMsg, listStartCopy );
ListDestroy( listStartCopy );
if (nResult = BACK) goto Dlg_ObjDialogs; // set up default status
SetStatusWindow( 0, "" );
Enable( STATUSEX );
StatusUpdate( ON, 100 ); 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
szAppPath = TARGETDIR;
// TO DO: if your application's main executable file is in a subfolder of TARGETDIR then append this subfolder to szAppPath
RegDBSetItem( REGDB_APPPATH, szAppPath );
RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
end;
谢谢回复!但我是指在InstallShield Express Limited Edition For Delphi 5中如何实现?
http://www.playicq.com/dispdocnew.php?t=33&id=839
http://www.playicq.com/dispdocnew.php?t=33&id=840