Share via


FileOperation Configuration Service Provider

4/8/2010

The FileOperation configuration service provider manages files and directories on the device. Using the FileOperation configuration service provider, an OEM or mobile operator can implement security for files.

This configuration service provider is managed over the OMA Client Provisioning protocol.

Note

Access to this configuration service provider is determined by security roles. Because OEMs and mobile operators can selectively disallow access, ask them about the availability of this configuration service provider. For more information about roles, see Security Roles and Default Roles for Configuration Service Providers.

Characteristics or parameters for the FileOperation configuration service provider contain an additional attribute called translation when specifying a parameter or characteristic that contains a file name or directory. The two values for this attribute are filesystem and install. A translation of type filesystem causes all file paths to be canonicalized (that is, double backslashes are removed). A translation of type install includes all the translations done for filesystem, but also translates all CE strings (for example, %CE2%) into the correct file path for the device. Cabwiz will automatically add the appropriate translation to file operations and registry keys in an .inf file.

Note

The correct way to help protect a file in the metabase is to use an asterisk (*) at the end of the file path (for example, FileOperation\FileCspRODir\FileCspReadOnlyFile*). The use of the asterisk helps to apply protection to all nodes under the filename node, and therefore to all file operations.

The following table shows the default settings. The default security role maps to each subnode unless specific permission is granted to the subnode.

Access type

Read/Write

Data type

string

Roles allowed to query and update setting

Manager

AuthenticatedUser

The security role for subnodes is implementation-specific, and can be changed by OEMs and mobile operators. To see the permission granted to specifice subnodes, see Metabase Settings for FileOperation Configuration Service Provider.

The following image shows the configuration service provider in tree format as used by OMA Client Provisioning.

Bb737563.f694fdbb-1cc0-4cfa-9126-edf867adf033(en-us,MSDN.10).gif

As these figures show, FileOperation is the root for all other nodes. This root node is followed by a directory characteristic and, in some cases, a file characteristic. The directory and file characteristic value is the directory or file to perform the action on. Action characteristics and parameters are listed as follows.

Characteristics

  • Copy
    Copies one file to another file.
  • Delete
    Deletes a file.
  • Directory
    The directory in which to perform the action. For example, this would be the directory in which to make or remove a directory. It can also be the directory that holds the file on which to perform the action.
  • Extract
    Extracts the file specified by the Source parameter from the currently open .cab file. The extracted file is placed in the file name and directory specified by the previous characteristic. The Extract characteristic can only be used in conjunction with a .cab file.
  • File
    The file on which to perform the action. For example, the source file for a move or copy action.
  • MakeDir
    This characteristic should appear under any characteristic where the type is a file path (for example, %CE2%\files). If the directory does not exist, MakeDir ensures that the directory is created.
  • Move
    Moves one file to another location. Can also be used to rename the file.
  • RemoveDir
    Removes a directory. This command is only successful if there are no files or subdirectories within the directory.
  • Shortcut
    Creates a shortcut to an executable file on the device. Shortcuts should be placed in the appropriate directory in the Start menu, under the Windows CE Directory Identifier (%CE17%).

Parameters

  • ForceDelete
    This parameter can be used in the Delete characteristic to delete the file even if the shared reference count is not zero.
  • NoOverwrite
    This parameter can be used in the Copy, Move, and Extract characteristics. If the destination file already exists, it is not replaced by this operation.
  • NoOverwriteIfnewer
    This parm can be used in the Copy, Move, and Extract characteristics. If the destination file already exists and is newer than the source file, the destination file is not replaced by this operation.
  • NoTransaction
    This parameter can be used in the MakeDir, RemoveDir, Copy, Move, Extract, and Delete characteristics. If this parameter is set, no backup file is created for this operation. If the operation fails, the original file is not restored. This will also prevent the entry from appearing in the recovery file.
  • RemoveAttributes
    This parameter can be used in a Copy or Move characteristics to remove the Archive (A), Hidden (H), ReadOnly (R), or System (S) attributes on the destination file. Requires the Manager role.
  • SelfRegister
    This parameter can be used in the Copy, Move, and Extract characteristics to indicate that this file is a self-registering COM server. The installation routine attempts to call DLLRegisterServer in that DLL. If this is used together with Delete, the DllUnregisterServer is called.
  • Shared
    This parameter can be used in the Copy, Move, and Extract characteristics to indicate that this file is a shared component and updates the reference count. On uninstall, the reference count is decremented, and the file is deleted only if the count is zero.
  • Source
    This parameter can be used in the Shortcut, Copy, Extract, and Move characteristics to indicate the file that action will be taken upon. For example, Source indicates the original file in a Copy operation.

Microsoft Custom Elements

The following table shows the Microsoft custom elements that this configuration service provider supports for OMA Client Provisioning.

Elements Available

parm-query

No

noparm

No

nocharacteristic

No

characteristic-query

No

Use these elements to build standard OMA Client Provisioning configuration XML. For information about specific elements, see MSPROV DTD Elements. For general examples of how to use the Microsoft custom elements, see OMA Client Provisioning XML File Examples.

For information about OMA Client Provisioning, see OMA Client Provisioning Files.

See Also

Tasks

FileOperation Configuration Service Provider Example for OMA Client Provisioning

Concepts

Configuration Service Provider Reference for Windows Mobile Devices