Provisioning XML Document for FileOperation Configuration Service Provider (Compact 2013)
3/26/2014
Configuration Manager uses this XML document to perform file operations on a Windows Embedded Compact powered device, including copying, moving, or deleting a file; creating a directory; and configuring a shortcut.
Syntax
<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="<Directory>"
<characteristic type="<OperationType>" />
<characteristic type="<File_Name>"
<characteristic type="<OperationType>">
<parm name="<ParmName>" value="<ParmValue>" />
</characteristic>
<parm type="<ParmName>" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
Elements
Element name |
Description |
Attributes |
---|---|---|
characteristic |
Groups settings or indicates operations for a configuration service provider. |
ValueDescription
FileOperationThe root characteristic element that groups all settings for the FileOperation configuration service provider.
<File_Name>The file or shortcut on which to perform the operation.
<Directory>A directory for the file operation.
CopyCopies the source file, specified in a child parm element, to the destination file specified in the parent characteristic element.
DeleteDeletes the file specified in the parent characteristic element.
ExtractExtracts the file specified in parm element's Source attribute from the currently open .cab file. Windows Embedded Compact places the extracted file in the directory specified by the parent characteristic element.
MakeDirCreates a new directory for the directory specified in the parent characteristic element.
MoveMoves one file to another location. You can also use the Move value to rename the file.
RemoveDirRemoves an empty directory.
ShortcutCreates a shortcut to the executable file specified in the child parm element.
ValueDescription
filesystemRemoves double backslashes from file paths.
installIncludes all the translations done for "filesystem."
|
parm |
Metadata that describes a device setting. |
ValueDescription
ForceDeleteAvailable when its parent characteristic element's type is Delete, to delete the file even if the shared reference count is 0 (zero).
NoOverwriteAvailable when its parent characteristic element's type is Copy, Move, or Extract. If the destination file already exists, the file is not replaced by this operation.
NoOverwriteIfnewerAvailable when its parent characteristic element's type is Copy, Move, or Extract. If the destination file already exists and is newer than the source file, the file is not replaced by this operation.
NoTransactionUse NoTransaction in a parm element that is contained in a characteristic element that uses the MakeDir, RemoveDir, Copy, Move, Extract, or Delete type. If this parameter is set, no backup file is created for this operation. If the operation fails, the original file is not restored.
SelfRegisterAvailable when its parent characteristic element's type is Copy, Move, or Extract to indicate that this file is a self-registering COM server. The installation routine tries to call DLLRegisterServer in that DLL. When used together with a characteristic element that uses type Delete, the installation routine tries to call DllUnregisterServer.
SharedAvailable when its parent characteristic element's type is Copy, Move, or Extract to indicate that this file is a shared component and to update the reference count. On uninstall, the reference count is decremented The file is deleted only if the count is zero.
RemoveAttributes
Attribute removal. When used, the corresponding value attribute indicates the type of attribute to remove. Set value to one of the following:
ValueDescription
ARemove the "Archive" file attribute.
HRemove the "Hidden" file attribute.
RRemove the "ReadOnly" file attribute.
SRemove the "System" file attribute.
SourceSource file. When used, the corresponding value attribute indicates the path of the file. Available when its parent characteristic element's type is Shortcut, Copy, Extract, or Move.
|
Remarks
To manage files and directories on the device, or to implement security for files on the device, you can write a provisioning XML file. However, the FileOperation configuration service provider supports only a subset of elements and its own attribute values for the characteristic and parm elements.
For more information about elements, see Provisioning XML Document.
Note
To help protect other files in the metabase from being incorrectly modified during a file operation, use an asterisk (*) at the end of the target file path (for example, FileOperation\FileCspRODir\FileCspReadOnlyFile*). When you use an asterisk, it helps protect files in all folders under the file name folder from being incorrectly included in the file operation.
Note
CAB Wizard will automatically add the appropriate translation to file operations and registry keys in an .inf file.
Example
The following example code:
- Creates a shortcut for Minesweeper (Minesweeper.lnk).
- Extracts the settings into a file (file1.txt) in a new directory (\\Windows\Files).
- Copies those settings into a new file (file2.txt).
- Moves the file to a new location and new file name (file3.txt) while concurrently removing the Hidden attribute (if it was set).
- Deletes file1.txt and file3.txt.
- Deletes the new directory (\\Windows\Files).
Important
For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.
<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\\Windows\Files" translation="install">
<characteristic type="MakeDir" />
<characteristic type="MineSweeper.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source"
value="\\Windows\Files\winmine.exe" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="\\Windows\Files" translation="install">
<characteristic type="MakeDir" />
<characteristic type="file1.txt">
<characteristic type="Extract">
<parm name="Source" value="\\Windows\files\file1.txt" />
</characteristic>
</characteristic>
<characteristic type="file2.txt">
<characteristic type="Copy">
<parm name="Source"
value="\\Windows\files\file1.txt" translation="install"/>
</characteristic>
</characteristic>
<characteristic type="file3.txt">
<characteristic type="Move">
<parm name="Source"
value="\\Windows\Files\file2.txt" translation="install"/>
<parm name="RemoveAttributes" value="H" />
</characteristic>
</characteristic>
<characteristic type="\\Windows\Files\file1.txt"
translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\\Windows\Files\file3.txt"
translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\\Windows\Files" translation="install">
<characteristic type="RemoveDir" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>