有三种方法:(以Notepad.exe为例)
1.Shell方法:ShellExecute(hwnd,"open","C:\\windows\\notepad.exe","",
     NULL,SW_SHOWNORMAL)2.Winexec方法:
     WinExec("C:\\windows\\notepad.exe",SW_SHOW)3.建立线程方法:
STARTUPINFO StartupInfo;
  PROCESS_INFORMATION ProcessInformation;
  memset(&StartupInfo, 0, sizeof(STARTUPINFO));
  StartupInfo.cb=sizeof(STARTUPINFO);
  if(!CreateProcess(NULL,
                   "C:\\windows\\notepad.exe",
                   NULL,
                   NULL,
                   false,
                   NORMAL_PRIORITY_CLASS,
                   NULL,
                   "",
                   &StartupInfo,
                   &ProcessInformation)

解决方案 »

  1.   

    你可以借助BCB的installshield 或Wise intallation system 9.0等软件,进行相关设置来可以制作BDE安装程序.
    做简单的方法是:
    复制BCB文件夹下BDE文件夹(当然只有部分有用,如果你不是很了解BDE,干脆整个文件夹),然后设置注册表两种方法:
    1。手动(内容参下)
    2。编程动态实现:
                     TRegistry *cReg=new TRegistry;
                     cReg->RootKey=HKEY_LOCAL_MACHINE;
                     cReg->OpenKey("Software\\Borland\\BLW32",true);
                     String path=GetCurrentDir();                 String BDEpath=path+"\\BDE";
                     cReg->WriteString("BLAPIPATH",BDEpath);
                     cReg->CloseKey();                 cReg->OpenKey("Software\\Borland\\Database Engine",true);                 cReg->WriteString("DLLPATH",BDEpath);
                     cReg->WriteString("CONFIGFILE01",BDEpath+"\\IDAPI.CFG");
                     cReg->CloseKey();
                     delete cReg;
      

  2.   

    ShellExecute(handle, "open", path_to_folder, NULL, NULL, SW_SHOWNORMAL);
    HINSTANCE ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );