TransitionOffline method of the Win32_OfflineFilesCache class

Transitions an item offline if possible.

Syntax

uint32 TransitionOffline(
  [in]  string  Path,
  [in]  boolean Force,
  [in]  uint32  Flags,
  [out] boolean OpenFiles
);

Parameters

Path [in]

Fully qualified UNC path of the item to be transitioned offline.

Force [in]

By default, any open handles to files that are not cached by Offline Files prevent the transition to offline. If this parameter is TRUE, the operation will forcibly close these handles, allowing the scope to transition offline.

Note

If file handles are forcibly closed, this can cause unexpected consequences, depending on the applications that are using those files.

Flags [in]

One or more of the following flag values.

OfflineFilesTransitionFlagInteractive (0x00000001)

Set this flag if the operation is allowed to display user interface elements as necessary. An example is the system's credential-request dialog.

OfflineFilesTransitionFlagConsole (0x00000002)

This flag is ignored if the OfflineFilesTransitionFlagInteractive flag is not set. If the OfflineFilesTransitionFlagInteractive flag is set, this flag indicates that any UI produced should be directed to the console window associated with the process invoking the operation.

OpenFiles [out]

Receives TRUE if open files prevented the transition, or FALSE otherwise. This value is useful only if FALSE was specified for the Force parameter.

Return value

This method returns either a WMI return code or a system error code.

Remarks

The entire scope of the item is transitioned offline, not just the item. An item's scope is defined as the closest ancestor shared folder of the item.

If open handles prevent the offline transition, the method returns a success value and the OpenFiles parameter receives TRUE.

Requirements

Minimum supported client
Windows Vista with SP1
Minimum supported server
Windows Server 2008
Version
KB935553 on Windows Vista
Namespace
Root\CIMv2
Header
Cscobj.h
MOF
OfflineFilesWmiProvider.mof
DLL
CscObj.dll

See also

KB935553

Win32_OfflineFilesCache