- WMI Library -
WMI Libraly > Win32_RemoveFileAction Class

Win32_RemoveFileAction Class

The RemoveFiles action uninstalls files previously installed by the InstallFiles action. Each of these files is 'gated' by a link to an entry in the Component class; only those files whose components are resolved to the iisAbsent Action state, or the iisSource Action state IF the component is currently installed locally, will be removed. The RemoveFiles action can also remove specific author-specified files that weren't installed by the InstallFiles action. Each of these files is 'gated' by a link to an entry in the Component class; those files whose components are resolved to any 'active' Action state (i.e. not in the 'off', or NULL, state) will be removed (if the file exists in the specified directory, of course). This implies that removal of files will be attempted when the gating component is first installed, during a reinstall, and again when the gating component is removed.
Namespace value is root/CIMV2.
WMI Provider value is MSIProv.


Properties

  • ActionID
  • The ActionID property is a unique identifier assigned to a particular action for a software element.

  • Caption
  • Not applicable.

  • Description
  • A description of the object.

  • Direction
  • The Direction property indicates whether a particular CIM_Action object is part of a sequence of actions to transition the current software element to its next state, such as "Install" or to remove the current software element, such as "Uninstall".

  • DirProperty
  • The name of a Win32_Property whose value is assumed to resolve to the full path to the folder of the file to be removed. The property can be the name of a directory iproperty for a Win32_DirectorySpecification or any other property that represents a full path.

  • File
  • The file name.

  • FileKey
  • A unique key identifying this remove file action within its product.

  • FileName
  • The property contains the name of the file to be removed. If this column is null, then the specified folder will be removed if it is empty. All of the files that match the wildcard will be removed from the specified directory.

  • InstallMode
  • A bit map that tells when this action will be preformed based on the following
    Hexadecimal
    Decimal
    Description

    0x001
    1
    Remove only when the associated component is being installed (msiInstallStateLocalor msiInstallStateSource).

    0x002
    2
    Remove only when the associated component is being removed (msiInstallStateAbsent).

    0x003
    3
    Remove in either of the above cases.

  • Name
  • Name is used to identify this software element

  • SoftwareElementID
  • The SoftwareElementID is an identifier for this software element.

  • SoftwareElementState
  • The SoftwareElementState indicates the state of a software element

  • TargetOperatingSystem
  • The TargetOperatingSystem indicates the target operating system of the owning software element.

  • Version
  • Version should be in the form .. or ..


    Methods

  • Invoke
  • The invoke method is to take a particular action. The details of how the method performs the action is implementation specific. The results of the method are based on the return value. - A 0 (zero) is returned if the condition is satisfied. - A 1 (one) is returned if the method is not supported. - Any other value indicates the condition is not satisfied.


    Example WQL

    SELECT * FROM Win32_RemoveFileAction
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...