• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
张纯睿
博客园    首页    新随笔    联系   管理    订阅  订阅

Installshield 文件及文件夹操作

http://www.yesky.com/385/153885.shtml

 其实用XCopyFile进行文件夹拷贝只需要一句话:
nResult = XCopyFile("C:...//SrcDir//*.*","C:...//TargetDir//*.*",COMP_NORMAL);

///////////////////////////////////////////////////////////////////////////////
//  EVENT:      Installed event is sent just after files for the component:
//              PLC are transferred.
///////////////////////////////////////////////////////////////////////////////


export prototype PLC_Installed();
function PLC_Installed()
begin  
 // 注意必须在  PLC_Installed 而不是在 PLC_Installing ,因为此时 PLC 文件夹可能还没有建立
 CreateDir (TARGETDIR^"PLC\\App_Data");
 CreateDir (TARGETDIR^"PLC\\PLC_log");
 CreateDir (TARGETDIR^"PLC\\PLC_resources");
 XCopyFile ("F:\\LEADSHOW PACKAGE SRC FILE\\plc\\App_Data\\*.*", TARGETDIR^"PLC\\App_Data", INCLUDE_SUBDIR);
 //XCopyFile ("F:\\LEADSHOW PACKAGE SRC FILE\\plc\\App_Data\\*.*", TARGETDIR^"PLC\\App_Data\\", INCLUDE_SUBDIR);
 //XCopyFile (TARGETDIR^"PLC\\App_Data", "F:\\LEADSHOW PACKAGE SRC FILE\\plc\\App_Data\\*.*", INCLUDE_SUBDIR);

 XCopyFile ("F:\\LEADSHOW PACKAGE SRC FILE\\plc\\PLC_resources\\*.*", TARGETDIR^"PLC\\PLC_resources", INCLUDE_SUBDIR);
end;


///////////////////////////////////////////////////////////////////////////////
//  EVENT:      Uninstalled event is sent just after files for the component:
//              PLC are removed during uninstallation.
///////////////////////////////////////////////////////////////////////////////
 
export prototype PLC_UnInstalled();
function PLC_UnInstalled()     
begin
 DeleteDir(TARGETDIR^"PLC", ALLCONTENTS);
end;


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/carl2380/archive/2010/08/20/5826114.aspx

posted @ 2011-06-29 15:10  张纯睿  阅读(781)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3