InstallShield - 使用XCopyFile将文件夹从网络复制到本地目录

时间:2014-05-17 23:14:54

标签: installation installshield installshield-2012

我对InstallShield有疑问。我正在尝试将文件从网络文件夹复制到我的本地目录。我创建了基本的MSI项目并创建了一个脚本,如果源和目标目录都在本地机器上,则会分叉,但如果源是网络位置,那么它根本就不起作用。任何人都可以帮助我。我设置运行脚本的自定义操作在InstallFinalize之后运行。

以下是我脚本中的代码,首先是SDIR用于本地,第二个SDIR是网络地址

// za program 2
#define SDIR          "C:\\ISExampl\\Source\\"
//#define SDIR           "\\CH\bla\\"
#define TDIR          "C:\\ISExampl\\Target\\"

// Include Ifx.h for built-in InstallScript function prototypes.

#include "Ifx.h"


export prototype ExFn_XCopyFile(HWND);
function ExFn_XCopyFile(hMSI)
    STRING szSrcFile;
    NUMBER nResult;
begin
    szSrcFile = "*.*";
    if (XCopyFile (SDIR ^ szSrcFile, TDIR ^ "*.*",
        INCLUDE_SUBDIR) < 0) then
        MessageBox ("XCopyFile failed", SEVERE);
    else
        MessageBox ("Sucess.", INFORMATION);
    endif;
end;

0 个答案:

没有答案
相关问题