C
cking331
Unregistered / Unconfirmed
GUEST, unregistred user!
Setup.rul文件代码如下:
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
////////////////////////////////////////////////////////////////////////////////
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the Onbegin
and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype MyFunction(HWND);
// Todo
: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
// Todo
: Create a custom action for this entry-point function:
// 1. Right-click on "Custom Actions" in the Sequences/Actions view.
// 2. Select "Custom Action Wizard" from the context menu.
// 3. Proceed through the wizard and give the custom action a unique name.
// 4. Select "Run InstallScript code" for the custom action type, and in
// the next panel select "MyFunction" (or the new name of the entry-
// point function) for the source.
// 5. Click Next, accepting the default selections until the wizard
// creates the custom action.
//
// Once you have made a custom action, you must execute it in your setup by
// inserting it into a sequence or making it the result of a dialog's
// control event.
///////////////////////////////////////////////////////////////////////////////
//
// Function: MyFunction
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// do
," above).
//
///////////////////////////////////////////////////////////////////////////////
function MyFunction(hMSI)
// Todo
: Declare local variables.
begin
MessageBox("1", SEVERE);
// Todo
: Write script that will be executed when MyFunction is called.
end;
function OnFirstUIAfter()
string szTitle, szMsg1, szMsg2, szOption1, szOption2, szFilename;
number bOpt1, bOpt2, nResult;
begin
Disable(STATUSEX);
bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MSG1);
SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);
//生成UnInstall的开始菜单快捷方式
szFilename = UNINSTALL_STRING;
nResult = StrFind(szFilename, ".exe");
if ((StrFind(szFilename, "/"") < 0) &&
(nResult >= 0)) then
StrSub(szMsg1, szFilename, 0, nResult + 4);
StrSub(szMsg2, szFilename,nResult + 4, 200);
szFilename = "/"" + szMsg1 + "/"" + szMsg2;
UNINSTALL_STRING = szFilename;
endif;
AddFolderIcon("BKSoft//BKMIS", "卸载MIS系统", szFilename, INSTALLDIR, WINDIR^"System32//msiexec.exe", 0, "", NULL);
end;
prototype CreateUninstallShortcut();
function CreateUninstallShortcut()
string strCmdLine;
LIST lstPath;
begin
MessageBox("1", SEVERE);
// For an InstallScript installation:
strCmdLine = DISK1TARGET ^ 'Setup.exe';
// For an InstallScript MSI installation:
strCmdLine = UNINSTALL_STRING;
// The path has to be handled differently if you are running
// an InstallScript MSI installation on Windows 9X.
if ( SYSINFO.WIN9X.bWin9X ) then
lstPath = ListCreate(STRINGLIST);
StrGetTokens(lstPath, UNINSTALL_STRING, '/');
ListGetFirstString(lstPath, strCmdLine);
LongPathToQuote(strCmdLine, TRUE);
strCmdLine = strCmdLine + ' /M' + PRODUCT_GUID;
endif;
// Create the shortcut.
AddFolderIcon(FOLDER_PROGRAMS ^ 'Uninstall Shortcut', 'Run the Uninstall',strCmdLine, '','',0, '', NULL );
end;
function Onbegin
()
string sMsg;
begin
sMsg = "提示";
MessageBox(sMsg, SEVERE);
abort;
end;
////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield (R)
// II SSSSSS (c) 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script
//
////////////////////////////////////////////////////////////////////////////////
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the Onbegin
and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype MyFunction(HWND);
// Todo
: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
// Todo
: Create a custom action for this entry-point function:
// 1. Right-click on "Custom Actions" in the Sequences/Actions view.
// 2. Select "Custom Action Wizard" from the context menu.
// 3. Proceed through the wizard and give the custom action a unique name.
// 4. Select "Run InstallScript code" for the custom action type, and in
// the next panel select "MyFunction" (or the new name of the entry-
// point function) for the source.
// 5. Click Next, accepting the default selections until the wizard
// creates the custom action.
//
// Once you have made a custom action, you must execute it in your setup by
// inserting it into a sequence or making it the result of a dialog's
// control event.
///////////////////////////////////////////////////////////////////////////////
//
// Function: MyFunction
//
// Purpose: This function will be called by the script engine when
// Windows(TM) Installer executes your custom action (see the "To
// do
," above).
//
///////////////////////////////////////////////////////////////////////////////
function MyFunction(hMSI)
// Todo
: Declare local variables.
begin
MessageBox("1", SEVERE);
// Todo
: Write script that will be executed when MyFunction is called.
end;
function OnFirstUIAfter()
string szTitle, szMsg1, szMsg2, szOption1, szOption2, szFilename;
number bOpt1, bOpt2, nResult;
begin
Disable(STATUSEX);
bOpt1 = FALSE;
bOpt2 = FALSE;
szMsg1 = SdLoadString(IFX_SDFINISH_MSG1);
SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);
//生成UnInstall的开始菜单快捷方式
szFilename = UNINSTALL_STRING;
nResult = StrFind(szFilename, ".exe");
if ((StrFind(szFilename, "/"") < 0) &&
(nResult >= 0)) then
StrSub(szMsg1, szFilename, 0, nResult + 4);
StrSub(szMsg2, szFilename,nResult + 4, 200);
szFilename = "/"" + szMsg1 + "/"" + szMsg2;
UNINSTALL_STRING = szFilename;
endif;
AddFolderIcon("BKSoft//BKMIS", "卸载MIS系统", szFilename, INSTALLDIR, WINDIR^"System32//msiexec.exe", 0, "", NULL);
end;
prototype CreateUninstallShortcut();
function CreateUninstallShortcut()
string strCmdLine;
LIST lstPath;
begin
MessageBox("1", SEVERE);
// For an InstallScript installation:
strCmdLine = DISK1TARGET ^ 'Setup.exe';
// For an InstallScript MSI installation:
strCmdLine = UNINSTALL_STRING;
// The path has to be handled differently if you are running
// an InstallScript MSI installation on Windows 9X.
if ( SYSINFO.WIN9X.bWin9X ) then
lstPath = ListCreate(STRINGLIST);
StrGetTokens(lstPath, UNINSTALL_STRING, '/');
ListGetFirstString(lstPath, strCmdLine);
LongPathToQuote(strCmdLine, TRUE);
strCmdLine = strCmdLine + ' /M' + PRODUCT_GUID;
endif;
// Create the shortcut.
AddFolderIcon(FOLDER_PROGRAMS ^ 'Uninstall Shortcut', 'Run the Uninstall',strCmdLine, '','',0, '', NULL );
end;
function Onbegin
()
string sMsg;
begin
sMsg = "提示";
MessageBox(sMsg, SEVERE);
abort;
end;