CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  PowerBuilder >  基础类

有关setup factory 6.0?

楼主happy_0325(风雨无阻)2003-09-03 22:44:52 在 PowerBuilder / 基础类 提问

我在用向导做到把文件加载进去就不知道怎么做了?  
  王各位兄弟姐妹赐教!!! 问题点数:100、回复次数:5Top

1 楼jerrymao(加菲猫--抵制倭寇和高丽棒子)回复于 2003-09-03 22:47:01 得分 10

没有用过,帮你upupTop

2 楼ttianhong(甜甜)回复于 2003-09-03 22:54:04 得分 20

read   help了!liulee写的一本书中有详细介绍!Top

3 楼ttianhong(甜甜)回复于 2003-09-03 22:58:05 得分 40

最近太多朋友问安装程序部分,部分是用ASA做数据库,下面给出我用INSTALLSHIELD做安装盘的脚本,供参考。    
  我的ASA开发时选取网络服务器,所以安装盘分为服务器版和工作站版,服务器版和工作站版都提供数据库的ODBC驱动注册ODBC,服务器版还提供数据库启动和停止的控制(因为是网络数据库,所以必须该机开机时数据库就得启动)。虽然有两个版本,但还是做成一个安装文件中,只是安装过程需要用户选择是安装工作站还是安装服务器。    
   
  下面只是提供脚本用于安装选项和注册部分(包括反注册部分),对于数据库支持文件与选择版本装与不装的控制这里不详述,用过的都知道在那做了。    
   
    主程序部分:    
   
   
  ////////////////////////////////////////////////////////////////////////////////    
  //                                                                                                                                                            
  //     File   Name:   Setup.rul                                                                                                          
  //                                                                                                                                                            
  //     Description:   InstallShield   script                                                                                    
  //                                                                                                                                                            
  //     Comments:   This   script   was   generated   based   on   the   selections   you   made   in    
  //                         the   Project   Wizard.     Refer   to   the   help   topic   entitled   "Modify                
  //                         the   script   that   the   Project   Wizard   generates"   for   information    
  //   on   possible   next   steps.    
  //    
  ////////////////////////////////////////////////////////////////////////////////    
   
   
  //   Include   header   files    
             
  #include   "ifx.h"    
             
  //////////////////////   string   defines   ////////////////////////////    
   
  ////////////////////   installation   declarations   ///////////////////    
   
  //   -----   DLL   function   prototypes   -----    
   
   
          //   your   DLL   function   prototypes    
   
   
  //   ----   script   function   prototypes   -----    
   
   
          //   your   script   function   prototypes    
   
          //   your   global   variables    
   
          string   szSerialno;                        
          number   bvType;    
   
  //////////////////////////////////////////////////////////////////////////////    
  //                                                                                                                                                          
  //     FUNCTION:       OnFirstUIBefore                                                                                            
  //                                                                                                                                                          
  //     EVENT:             FirstUIBefore   event   is   sent   when   installation   is   run   for   the   first    
  //                             time   on   given   machine.   In   the   handler   installation   usually   displays    
  //                             UI   allowing   end   user   to   specify   installation   parameters.   After   this    
  //                             function   returns,   ComponentTransferData   is   called   to   perform   file    
  //                             transfer.    
  //                                                                                                                                                          
  ///////////////////////////////////////////////////////////////////////////////    
  function   OnFirstUIBefore()    
          number     nResult,nSetupType;    
          string     szTitle,   szMsg;    
          string     szLicenseFile,   szQuestion;    
          string     szName,   szCompany,   szSerial;    
          string     szTargetPath;    
          string     szDir;    
          string     szComponents,   szTargetdir;    
          number     nLevel;    
          number     nvSize;        
          string   szComponent;    
          number     bvCheck1,bvCheck2   ;    
  begin      
          //   TO   DO:   if   you   want   to   enable   background,   window   title,   and   caption   bar   title                                                                                                                                              
          //   SetTitle(   @TITLE_MAIN,   24,   WHITE   );                                                                                    
          //   SetTitle(   @TITLE_CAPTIONBAR,   0,   BACKGROUNDCAPTION   );                                              
          //   Enable(   FULLWINDOWMODE   );            
          //   Enable(   BACKGROUND   );          
          //   SetColor(BACKGROUND,RGB   (0,   128,   128));            
           
          nSetupType   =   TYPICAL;      
          TARGETDIR   =   PROGRAMFILES   ^@COMPANY_NAME   ^@PRODUCT_NAME;      
          szDir   =   TARGETDIR;    
          szName         =   "";    
          szCompany   =   "";    
          szSerial   =   "";    
   
  Dlg_Start:    
          //   beginning   of   dialogs   label    
   
  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_SdRegisterUserEx:    
          szMsg       =   "";    
          szTitle   =   "";      
          nResult   =   SdRegisterUserEx(   szTitle,   szMsg,   szName,   szCompany,   szSerial   );    
          if   (nResult   =   BACK)   goto   Dlg_SdLicense;    
         
  CheckSerial:                                                                
          StrToUpper   (   szSerial   ,   szSerial   );    
          if   (   szSerial   !=   "98866445")   then    
            szMsg   =   "序列号错误,请重新输入"   ;    
                  MessageBox   (   szMsg   ,   WARNING   );      
                  szSerial   =   "";    
            goto   Dlg_SdRegisterUserEx;    
            endif;    
            szSerialno   =   szSerial;    
   
  SelectType:    
  szMsg="请选择安装的计算机器用于:"       ;    
  bvCheck1   =   TRUE;                                                
  bvCheck2   =   FALSE;    
  bvType   =   TRUE;    
  nResult   =   AskOptions   (   EXCLUSIVE   ,   szMsg   ,   "服务器"   ,   bvCheck1   ,   "工作站"   ,   bvCheck2   );    
          if   (nResult   =   BACK)   goto   Dlg_SdRegisterUserEx;    
          if   bvCheck2   =   TRUE   then    
            bvType   =   FALSE;    
                  szComponent   =   "数据库"+"\\"+"数据库文件";    
            ComponentSelectItem   (   MEDIA   ,   szComponent   ,   FALSE   );        
            ComponentSetData   (MEDIA,   szComponent,COMPONENT_FIELD_VISIBLE   ,   FALSE,   "");    
   
          endif;      
         
  Dlg_SdAskDestPath:    
          szTitle   =   "";    
          szMsg       =   "";    
          nResult   =   SdAskDestPath(   szTitle,   szMsg,   szDir,   0   );    
          TARGETDIR   =   szDir;    
          if   (nResult   =   BACK)   goto   SelectType;    
   
  Dlg_SetupType:          
          szTitle         =   "";    
          szMsg             =   "";    
          nResult   =   SetupType   (   szTitle   ,   szMsg   ,   ""   ,   nSetupType   ,   0   );    
          if   (nResult   =   BACK)   then    
                  goto   Dlg_SdAskDestPath;    
          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_SdComponentTree:      
          if   ((nResult   =   BACK)   &&   (nSetupType   !=   CUSTOM))   goto   Dlg_SetupType;    
          szTitle         =   "";    
          szMsg             =   "";    
          szTargetdir   =   TARGETDIR;    
          szComponents   =   "";    
          nLevel   =   2;    
          if   (nSetupType   =   CUSTOM)   then                                                                              
               
          nResult   =   SdComponentTree(szTitle,   szMsg,   szTargetdir,   szComponents,   nLevel);    
          if   (nResult   =   BACK)   goto   Dlg_SetupType;        
          endif;    
   
  Dlg_ObjDialogs:    
          nResult   =   ShowObjWizardPages(nResult);    
          if   (nResult   =   BACK)   goto   Dlg_SdComponentTree;    
             
          //   setup   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      
          //   TO   DO   :   if   your   application   .exe   is   in   a   subfolder   of   TARGETDIR   then   add   subfolder      
          szAppPath   =   TARGETDIR;    
          RegDBSetItem(REGDB_APPPATH,   szAppPath);    
          RegDBSetItem(REGDB_APPPATH_DEFAULT,   szAppPath   ^   @PRODUCT_KEY);    
  end;    
   
  //   ---   include   script   file   section   ---    
  Top

4 楼ttianhong(甜甜)回复于 2003-09-03 22:58:43 得分 30

 
  //////////////////////////////////////////////////////////////////////////////    
  //    
  //     FUNCTION:       OnMoved    
  //    
  //     EVENT:             Moved   event   is   sent   when   file   transfer   started   by   ComponentTransferData   call    
  //                             has   finished.   At   this   point   all   file   transfer   operations   are   completed      
  //                             except   for   batch   self-registration   which   is   performed   immediately   after   this    
  //                             function   returns.   During   uninstallation   this   event   sent   after   uninstallation    
  //                             is   completed.   For   that   reason   you   should   not   modify   system   state   in   this    
  //                             event   handler.    
  //    
  ///////////////////////////////////////////////////////////////////////////////    
  function   OnMoved()    
  string   szFileName,szSectionName;    
  string   szKeyName;          
  string   szKey,   szName,   szValue;      
  number   nSize;    
  string   szNumName,szNumValue;    
  number   nType,nRootKey;    
  number   nvType,   nvSize;    
          string   svNumValue;            
          string   szTitle   ,   szMsg;    
  begin                              
          szTitle   =   "重新启动计算机";    
          szMsg   =   "安装完成,请重新启动计算机";    
             
            if   bvType   =   TRUE   then    
            RebootDialog   (   szTitle   ,   szMsg   ,   SYS_BOOTMACHINE   );    
          endif;    
  end;          
       
  #include   "ComponentEvents.rul"        
   
  notbig@21cn.com        
       
  已得分:0     发表时间:2003-3-4   12:14:31           版主操作:   [删除]                
  notbig   老奀        
         
       
  专家分:     3359      
  文     章:     2049      
  结贴率:     30/34        
    注册部分:    
   
  ///////////////////////////////////////////////////////////////////////////////    
  //     EVENT:             Installed   event   is   sent   just   after   files   for   the   component:      
  //                             数据库\数据库文件   are   transferred.      
  ///////////////////////////////////////////////////////////////////////////////    
       
  export   prototype   Component_Installed();    
  function   Component_Installed()              
  string   szFileName,szSectionName;    
  string   szKeyName;          
  string   szKey,   szName,   szValue;      
  number   nSize;    
  string   szNumName,szNumValue;    
  number   nType,nRootKey;    
  number   nvType,   nvSize;    
          string   svNumValue;            
          string   szTitle   ,   szMsg;    
               
  begin    
  nRootKey   =   HKEY_LOCAL_MACHINE   ;    
          RegDBSetDefaultRoot   (nRootKey);    
          szKey   =   "\\SOFTWARE\\华普软件\\退休人员管理系统";   //^   @COMPANY_NAME   ^   @PRODUCT_NAME   ;   //自己的主键      
                                                             
  if   bvType   =   TRUE   then    
        szNumName   =   "dbrun";    
          szNumValue   =   "\""   +   TARGETDIR^"dbsrv7.exe\"   -xtcpip   -z     \""+TARGETDIR^"PERSONDATA.DB\"";//键值      
              nType   =   REGDB_STRING;//类型      
              nSize   =   -1;//指定大小            
              if   (RegDBGetKeyValueEx   (szKey,   szNumName,   nvType,   svNumValue,   nvSize)   <   0)   then    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
  endif;    
   
  szNumName   =   "dbstop";    
  szNumValue   =   "\""   +   TARGETDIR^"dbstop.exe\"   -c   \"eng=persondata;uid=DBA;pwd=SQL\"";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  if   (RegDBGetKeyValueEx   (szKey,   szNumName,   nvType,   svNumValue,   nvSize)   <   0)   then    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
  endif;    
   
  //注册启动数据库服务    
  szKey   =   "\\SOFTWARE"   ^   "Microsoft"^"Windows"^"CurrentVersion"^"Run"   ;    
  szNumName   =   "PCARDDATA";//键名    
  szNumValue   =   "\""   +   TARGETDIR^"dbsrv7.exe\"   -xtcpip   -z   \""+TARGETDIR^"PERSONDATA.DB\"";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  if   (RegDBGetKeyValueEx   (szKey,   szNumName,   nvType,   svNumValue,   nvSize)   <   0)   then    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
  endif;    
  endif;    
  end;    
   
  ///////////////////////////////////////////////////////////////////////////////    
  //   EVENT:   Installed   event   is   sent   just   after   files   for   the   component:    
  //   数据库\数据库支持文件   are   transferred.    
  ///////////////////////////////////////////////////////////////////////////////    
   
  export   prototype   Component1_Installed();    
   
  function   Component1_Installed()    
  string   szFileName,szSectionName;    
  string   szKeyName;    
  string   szKey,   szName,   szValue;    
  number   nSize;    
  string   szNumName,szNumValue;    
  number   nType,nRootKey;    
  number   nvType,   nvSize;    
  string   svNumValue;    
  string   szTitle   ,   szMsg;    
   
  begin    
  nRootKey   =   HKEY_LOCAL_MACHINE   ;    
  RegDBSetDefaultRoot   (nRootKey);    
  szKey   =   "\\SOFTWARE\\华普软件\\退休人员管理系统";   //^   @COMPANY_NAME   ^   @PRODUCT_NAME   ;   //自己的主键    
   
  szNumName   =   "SERVERtag";//键名    
  if   bvType   =   TRUE   then    
  szNumValue   =   "1";//键值    
  else    
  szNumValue   =   "0";    
  endif;    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  if   (RegDBGetKeyValueEx   (szKey,   szNumName,   nvType,   svNumValue,   nvSize)   <   0)   then    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
  endif;    
   
  nRootKey   =   HKEY_CURRENT_USER   ;    
  RegDBSetDefaultRoot   (nRootKey);    
   
  szKey   =   "\\SOFTWARE"   ^   "ODBC"^"ODBC.INI"^"mypcard";    
   
  szNumName   =   "(default)";//键名    
  szNumValue   =   "";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "AutoStop";//键名    
  szNumValue   =   "yes";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "DatabaseName";//键名    
  szNumValue   =   "persondata";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "EngineName";//键名    
  szNumValue   =   "persondata";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "Commlinks";//键名    
  szNumValue   =   "TCPIP{},SharedMemory";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "DescribeCursor";//键名    
  szNumValue   =   "No";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "Driver";//键名    
  szNumValue   =   TARGETDIR   ^   "DBODBC7.DLL";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "Integerated";//键名    
  szNumValue   =   "No";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  nRootKey   =   HKEY_LOCAL_MACHINE   ;    
  RegDBSetDefaultRoot   (nRootKey);    
  szKey   =   "\\SOFTWARE"   ^   "ODBC"^"ODBCINST.INI"^"MYASA   7.0";    
   
  szNumName   =   "(default)";//键名    
  szNumValue   =   "";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "Driver";//键名    
  szNumValue   =   TARGETDIR   ^   "DBODBC7.DLL";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
  szNumName   =   "Setup";//键名    
  szNumValue   =   TARGETDIR   ^   "DBODBC7.DLL";//键值    
  nType   =   REGDB_STRING;//类型    
  nSize   =   -1;//指定大小    
  RegDBSetKeyValueEx(szKey,   szNumName,   nType,   szNumValue,nSize)   ;    
   
   
   
  end;    
  Top

5 楼happy_0325(风雨无阻)回复于 2003-09-04 10:07:32 得分 0

liulee写的书名能说一下吗?Top

相关问题

  • ====有关使用Setup Factory 7.0.1打包的几个问题====
  • 有关Setup Factory 7.0安装路径的问题
  • 请问一个有关使用setup factory的问题?在线急等!。。。。。。。
  • Setup Factory 5.0
  • 求setup factory。
  • Setup Factory 问题
  • Setup factory 6.0
  • 求Setup Factory 5.0的破解!
  • 关于SETUP FACTORY 的问题!
  • Setup Factory 7.0打包问题

关键词

  • 安装
  • 数据库
  • 服务器
  • 文件
  • script
  • 工作站
  • 部分
  • 版
  • function prototypes
  • 提供

得分解答快速导航

  • 帖主:happy_0325
  • jerrymao
  • ttianhong
  • ttianhong
  • ttianhong

相关链接

  • PowerBuilder类图书
  • PowerBuilder类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo