导航
  • 主页
  • API 调用
  • 基础类
  • 控件与界面
  • 数据库相关
  • DataWindow
  • 项目管理
  • Web 应用
  • 脚本语言

打包的两个问题!

lzuyh 2003-12-15 10:31:00
1、pb9+asa8怎么用installshield打包,第一没用过,第二搜索了论坛,不太详细。
2、能否帮助分析一下下面的东西(那位前辈写的)。
function SetupRegistry()
NUMBER nResult;

begin
RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
if(RegDBKeyExist ("Software\\ODBC") < 0) then
RegDBCreateKeyEx ("Software\\ODBC\\" ,"");
RegDBCreateKeyEx ("Software\\ODBC\\ODBC.INI" ,"");
RegDBCreateKeyEx ("Software\\ODBC\\ODBCINST.INI" ,"");
RegDBCreateKeyEx ("Software\\ODBC\\ODBCINST.INI\\ODBC Drivers" ,"");
RegDBCreateKeyEx ("Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0" ,"");
endif;
//Adaptive Server Anywhere 7.0
if (RegDBKeyExist("Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0") < 0) then
RegDBCreateKeyEx ("Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0" ,"");
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0" , "Driver" , REGDB_STRING ,TARGETDIR ^ "\\Asa70\\WIN32\\dbodbc7.dll", -1); // TARGETDIR + "\dbodbc7.dll", -1);
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0" , "Setup" , REGDB_STRING ,TARGETDIR ^ "\\Asa70\\WIN32\\dbodbc7.dll", -1); //TARGETDIR + "\dbodbc7.dll ", -1);
endif;

//Adaptive Server Anywhere 7.0 Translator
if (RegDBKeyExist("Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0 Translator") < 0) then
RegDBCreateKeyEx ("Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0 Translator" ,"");
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0 Translator" , "Setup" , REGDB_STRING ,TARGETDIR ^ "\\Asa70\\WIN32\\dbodtr7.dll", -1);
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\Adaptive Server Anywhere 7.0 Translator" , "Translator" , REGDB_STRING ,TARGETDIR ^ "\\Asa70\\WIN32\\dbodtr7.dll", -1);
endif;

///////
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\ODBC Drivers" , "Adaptive Server Anywhere 7.0" , REGDB_STRING , "Installed" , -1);
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBCINST.INI\\ODBC Translators" , "Adaptive Server Anywhere 7.0 Translator" , REGDB_STRING , "Installed" , -1);

RegDBSetDefaultRoot ( HKEY_CURRENT_USER );
if(RegDBKeyExist("Software\\ODBC\\ODBC.INI\\TEST") < 0) then
if(RegDBKeyExist("Software\\ODBC\\ODBC.INI") < 0) then
if(RegDBKeyExist("Software\\ODBC") < 0) then
RegDBCreateKeyEx ("Software\\ODBC","");
endif;
RegDBCreateKeyEx ("Software\\ODBC\\ODBC.INI","");
endif;
RegDBCreateKeyEx ("Software\\ODBC\\ODBC.INI\\TEST","");
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "AutoStop" , REGDB_STRING , "YES" , -1); //AutoStop
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "Driver" , REGDB_STRING ,TARGETDIR ^ "\\Asa70\\WIN32\\dbodbc7.dll" , -1); //Driver
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "Integrated" , REGDB_STRING ,"NO" , -1); //Integrated
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "PWD" , REGDB_STRING , "sql" , -1); //PWD
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "UID" , REGDB_STRING ,"dba" , -1); //UID


RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "Start" , REGDB_STRING , TARGETDIR ^ "\\Asa70\\WIN32\\dbsrv7.exe -c 16m" , -1);
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "DatabaseFile" , REGDB_STRING , TARGETDIR ^ "\\DataBase\\TEST.db" , -1);



//RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\TEST", "Start" ,REGDB_STRING ,TARGETDIR ^ "Asa70\\win32\\dbsrv7.exe -c 16m" , -1);//Start

//else
// RegDBDeleteKey ("Software\\ODBC\\ODBC.INI\\TEST");
// RegDBCreateKeyEx ("Software\\ODBC\\ODBC.INI\\TEST","");
endif;

if(RegDBKeyExist("Software\\ODBC\\ODBC.INI\\ODBC Data Sources") < 0) then
RegDBCreateKeyEx ("Software\\ODBC\\ODBC.INI\\ODBC Data Sources","");
endif;
RegDBSetKeyValueEx ( "Software\\ODBC\\ODBC.INI\\ODBC Data Sources", "TEST" , REGDB_STRING ,"Adaptive Server Anywhere 7.0" , -1);


// TODO : Add all your registry entry keys here
// RegDBCreateKeyEx, RegDBSetKeyValueEx....
return 0;
//nResult=CreateRegistrySet("");
//return nResult;
end;

...全文
3 点赞 收藏 3
写回复
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mittee 2003-12-15
asa需要一些dll要很认真的找才行,你参考一下asa7的dll
对注册表操作pb也可以做。
回复
treesoft 2003-12-15
安装完asa8后有,应该变为dbodtr.dll了,自己在sybase目录下找吧。这段代码是注册数据源用的,这是installshield自己的一种语言,介乎C与pascal之间,你得自己看帮助。
回复
lzuyh 2003-12-15
我的问题怎么没人管。
dbodtr7.dll这个文件是干什么的?装完asa8后有这个文件吗。
回复
发动态
发帖子
PowerBuilder
创建于2007-09-28

814

社区成员

PowerBuilder 相关问题讨论
申请成为版主
社区公告
暂无公告