///////////////////////////////////////////////////////////////////////////////
// EVENT: Installed event is sent just after files for the feature:
// \IF97 are transferred.
///////////////////////////////////////////////////////////////////////////////
export prototype IF97_Installed();
function IF97_Installed()
string szKey,szClass,szKeySub;
string szOfficeVer,szAddInPathPost,szOpenKeyPost,szValueName,IFCSWDir;
string AddInPath,szXLAFN,szCurKeyValue,szDstStr,svString;
number nFor,nCount,nOk;
number nvType,nvSize;
BOOL bBWStr;
begin
szXLAFN="IF97.xla";
//szDstStr="\""+AddInPath+"\\"+szXLAFN+"\"";
szDstStr="\""+INSTALLDIR+szXLAFN+"\"";
//更改基本键
RegDBSetDefaultRoot(HKEY_CURRENT_USER);
//循环3次,要同时适用于
//Excel 97 (8.0)
//Excel 2000 (9.0)
//Excel XP (2002) (10.0)
for nFor = 1 to 3
switch (nFor)
case 1: //Excel 97 (8.0)
szOfficeVer="8.0"; //Office的内部版本号
szAddInPathPost="\\Library\\"+IFCSWDir; //加插宏的路径
szOpenKeyPost="Microsoft Excel"; //自动安装的加插宏子键名
case 2: //Excel 2000 (9.0)
szOfficeVer="9.0";
szAddInPathPost="Library\\"+IFCSWDir;
szOpenKeyPost="Options";
case 3: //Excel XP (2002) (10.0)
szOfficeVer="10.0";
szAddInPathPost="Library\\"+IFCSWDir;
szOpenKeyPost="Options";
default:
endswitch;