Compartilhar via


CopyFiles (Compact 2013)

3/26/2014

The CopyFiles key, under the [DefaultInstall] section, is required and describes the default files to copy to the target device.

Ee504697.security(en-us,WinEmbedded.80).gifSecurity Note:
If files require protection from being overwritten on the device by unprivileged applications, before creating the .cab file, make sure that these files are marked as System files on the desktop. The CAB Wizard examines the attributes of each file packed in the .cab file, and honors these attributes when the files are installed on the device.

Syntax

[copyfile_list_section]
destination_filename,[source_filename],[,flags]

Parameters

  • destination_filename
    Specifies the name of the destination file.

    Note

    Use only Unicode characters that can be converted into ANSI characters without data loss. This enables backward compatibility with earlier device versions. For more information, see CAB Wizard.

  • source_filename
    Optional if this is identical to destination_filename.
  • flags
    Contains a numeric value that specifies an action to be done while copying files.

    The following table shows the values that are supported by Windows Embedded Compact.

    Flag

    Value

    Description

    COPYFLG_WARN_IF_SKIP

    0x00000001

    Warn a user if an attempt is made to skip a file after an error occurs.

    COPYFLG_NOSKIP

    0x00000002

    Do not allow a user to skip copying a file.

    COPYFLG_NO_OVERWRITE

    0x00000010

    Do not overwrite a file in the destination directory.

    COPYFLG_REPLACEONLY

    0x00000400

    Copy the source file to the destination directory only if the file is in the destination directory.

    CE_COPYFLG_NO_DATE_DIALOG

    0x20000000

    Do not copy files if the target file is newer.

    CE_COPYFLG_NODATECHECK

    0x40000000

    Ignore date while overwriting the target file.

    CE_COPYFLG_SHARED

    0x80000000

    Create a reference when a shared DLL is counted.

Remarks

Do not use unsupported characters in your file path, such as /, *, ?, <, >, and |. The CAB Wizard will replace these characters with spaces, which may cause the configuration service provider (CSP) to terminate with errors. If you are using environment variables in your path, make sure that their value strings do not contain these characters.

The following [CopyFiles] code example renames Help.htm and warns if it is skipped, while WinGame.wav is renamed and marked as shared:

[DefaultInstall]
CopyFiles = CopyFilesSection

[CopyFilesSection]
"Sample Help.htm",Help.htm,,0x00000001
"Win Game.wav",WinGame.wav,,0x80000000

See Also

Reference

Information (.inf) File Overview
CAB Wizard