你解决了吗?仅仅打包是不够的,要改注册表的.真是可以.什么乱七八糟的.下面的代码试试看
function FunAddBde()
STRING SOURCE_DIR,TARGET_DIR,subdir;
STRING szKey, szClass, szMsg, szTitle, szNumName, szNumValue, svNumValue;
NUMBER nvType, nvSize;
NUMBER nRootKey;
begin
SOURCE_DIR = SRCDIR;
TARGET_DIR = TARGETDIR ;
//StrSub(subdir,SRCDIR,0,StrLength(SRCDIR)-2);
//SRCDIR = subdir + "2";
SRCDIR = SRCDIR + "//BDE";
TARGETDIR = COMMONFILES+"//Borland Shared//BDE" ;
Enable(STATUS);
StatusUpdate( ON, 100 );
CopyFile("*.*", "*.*");
Disable(STATUS);
SRCDIR = SOURCE_DIR;
TARGETDIR = TARGET_DIR;
nRootKey = HKEY_LOCAL_MACHINE;
RegDBSetDefaultRoot(nRootKey);
szKey = "SOFTWARE//Borland";
szClass = "";
RegDBCreateKeyEx(szKey, szClass);
nvType = REGDB_STRING;
szKey = "SOFTWARE//Borland//"+"//BLW32";
RegDBSetKeyValueEx(szKey,"Blapipath",nvType,WINDISK+"//"+Definefloder+"//Borland Shared//BDE",-1);
szKey = "SOFTWARE//Borland//"+"//Database Engine";
RegDBSetKeyValueEx(szKey,"Dllpath",nvType,WINDISK+"//"+Definefloder+"//Borland Shared//BDE",-1);
RegDBSetKeyValueEx(szKey,"CONFIGFILE01",nvType,WINDISK+"//"+Definefloder+"//Borland Shared//BDE//Idapi.cfg",-1);
RegDBSetKeyValueEx(szKey,"RESOUCE",nvType,"0009",-1);
RegDBSetKeyValueEx(szKey,"SaveConfig",nvType,"WIN32",-1);
RegDBSetKeyValueEx(szKey,"UseCount",nvType,"3",-1);
szKey = "SOFTWARE//Borland//Database Engine//"+"//settings";
RegDBCreateKeyEx(szKey,szClass);
szKey = "SOFTWARE//Borland//Database Engine//settings"+"//SYSTEM//FORMATS//DATE";
RegDBSetKeyValueEx(szKey,"SEPARATOR",nvType,"/",-1);
RegDBSetKeyValueEx(szKey,"MODE",nvType,"0",-1);
RegDBSetKeyValueEx(szKey,"FOURDIGITYEAR",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"YEARBIASED",nvType,"TRUE",-1);
RegDBSetKeyValueEx(szKey,"LEADINGZEROM",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"LEADINGZEROD",nvType,"FALSE",-1);
szKey = "SOFTWARE//Borland//Database Engine//settings"+"//SYSTEM//FORMATS//NUMBER";
RegDBSetKeyValueEx(szKey,"DECIMALSEPARATOR",nvType,".",-1);
RegDBSetKeyValueEx(szKey,"THOUSANDSEPARATOR",nvType,",",-1);
RegDBSetKeyValueEx(szKey,"DECIMALDIGITS",nvType,"2",-1);
RegDBSetKeyValueEx(szKey,"LEADINGZERON",nvType,"TRUE",-1);
szKey = "SOFTWARE//Borland//Database Engine//settings"+"//SYSTEM//FORMATS//TIME";
RegDBSetKeyValueEx(szKey,"TWELVEHOUR",nvType,"TRUE",-1);
RegDBSetKeyValueEx(szKey,"AMSTRING",nvType,"AM",-1);
RegDBSetKeyValueEx(szKey,"PMSTRING",nvType,"PM",-1);
RegDBSetKeyValueEx(szKey,"SECONDS",nvType,"TRUE",-1);
RegDBSetKeyValueEx(szKey,"MILSECONDS",nvType,"FALSE",-1);
szKey = "SOFTWARE//Borland//Database Engine//settings"+"//SYSTEM//INIT";
RegDBSetKeyValueEx(szKey,"VERSION",nvType,"4.0",-1);
RegDBSetKeyValueEx(szKey,"LOCAL SHARE",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"MINBUFSIZE",nvType,"128",-1);
RegDBSetKeyValueEx(szKey,"MAXBUFSIZE",nvType,"2048",-1);
RegDBSetKeyValueEx(szKey,"LANGDRIVER",nvType,"china",-1);
RegDBSetKeyValueEx(szKey,"MAXFILEHANDLES",nvType,"48",-1);
RegDBSetKeyValueEx(szKey,"SYSFLAGS",nvType,"0",-1);
RegDBSetKeyValueEx(szKey,"LOW MEMORY USAGE LIMIT",nvType,"32",-1);
RegDBSetKeyValueEx(szKey,"AUTO ODBC",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"DEFAULT DRIVER",nvType,"PARADOX",-1);
RegDBSetKeyValueEx(szKey,"MEMSIZE",nvType,"16",-1);
RegDBSetKeyValueEx(szKey,"SHAREDMEMSIZE",nvType,"2048",-1);
RegDBSetKeyValueEx(szKey,"SHAREDMEMLOCATION",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"DATA REPOSITORY",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"SQLQRYMODE",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"MTS POOLING",nvType,"FALSE",-1);
szKey = "SOFTWARE//Borland//Database Engine//Settings"+"//DRIVERS//DB2//DB OPEN";
RegDBSetKeyValueEx(szKey,"USER NAME",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"DB2 DSN",nvType,"DB2_SERVER",-1);
RegDBSetKeyValueEx(szKey,"OPEN MODE",nvType,"READ/WRITE",-1);
RegDBSetKeyValueEx(szKey,"SCHEMA CACHE SIZE",nvType,"8",-1);
RegDBSetKeyValueEx(szKey,"LANGDRIVER",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"SQLQRYMODE",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"SQLPASSTHRU MODE",nvType,"SHARED AUTOCOMMIT",-1);
RegDBSetKeyValueEx(szKey,"SCHEMA CACHE TIME",nvType,"-1",-1);
RegDBSetKeyValueEx(szKey,"MAX ROWS",nvType,"-1",-1);
RegDBSetKeyValueEx(szKey,"BATCH COUNT",nvType,"200",-1);
RegDBSetKeyValueEx(szKey,"ENABLE SCHEMA CACHE",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"SCHEMA CACHE DIR",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"ENABLE BCD",nvType,"FALSE",-1);
RegDBSetKeyValueEx(szKey,"ROWSET SIZE",nvType,"20",-1);
RegDBSetKeyValueEx(szKey,"BLOBS TO CACHE",nvType,"64",-1);
RegDBSetKeyValueEx(szKey,"BLOB SIZE",nvType,"32",-1);
szKey = "SOFTWARE//Borland//Database Engine//Settings"+"//DRIVERS//DB2//INIT";
RegDBSetKeyValueEx(szKey,"VERSION",nvType,"4.0",-1);
RegDBSetKeyValueEx(szKey,"TYPE",nvType,"SERVER",-1);
RegDBSetKeyValueEx(szKey,"DLL32",nvType,"SQLDB2V5.DLL",-1);
RegDBSetKeyValueEx(szKey,"DRIVER",nvType,"IBM DB2 DRIVER",-1);
RegDBSetKeyValueEx(szKey,"DRIVER FLAGS",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"TRACE MODE",nvType,"0",-1);
szKey = "SOFTWARE//Borland//Database Engine//Settings"+"//DRIVERS//MSACCESS//DB OPEN";
RegDBSetKeyValueEx(szKey,"DATABASE NAME",nvType,"DRIVERS:/PATH/DATABASE.MDB",-1);
RegDBSetKeyValueEx(szKey,"USER NAME",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"OPEN MODE",nvType,"READ/WRITE",-1);
RegDBSetKeyValueEx(szKey,"LANGDRIVER",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"SYSTEM DATABASE",nvType,"",-1);
szKey = "SOFTWARE//Borland//Database Engine//Settings"+"//DRIVERS//MSACCESS//INIT";
RegDBSetKeyValueEx(szKey,"VERSION",nvType,"1.0",-1);
RegDBSetKeyValueEx(szKey,"TYPE",nvType,"SERVER",-1);
RegDBSetKeyValueEx(szKey,"DLL32",nvType,"IDDAO32.DLL",-1);
RegDBSetKeyValueEx(szKey,"DRIVER FLAGS",nvType,"",-1);
RegDBSetKeyValueEx(szKey,"TRACE MODE",nvType,"0",-1);
return 0;
end;
将上面的代码放到你的Setup.rul中。至于你的sybase可以参照来写。