- WMI Library -
WMI Libraly > Win32_ShortcutAction Class

Win32_ShortcutAction Class

The CreateShortcuts action manages the creation of shortcuts. In the Advertise mode, the action creates shortcuts to the key files of components of features that are enabled. Advertised shortcuts are those for which the Target property is the feature of the component and the directory of the shortcut is one of the Shell folders or below one. Advertised shortcuts are created with a Microsoft installer technology Descriptor as the target. Non-advertised shortcuts are those for which the Target column in the Shortcut class is a property or the directory of the shortcut is not one of the Shell folders or below one. Advertised shortcuts are created with a Microsoft installer technology Descriptor as the target. In the non-advertise mode (normal install) the action creates shortcuts to the key files of components of features that are selected for install as well as non-advertised shortcuts whose component is selected for install.
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.

  • Arguments
  • The command-line arguments for the shortcut.

  • 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".

  • HotKey
  • The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte.

  • IconIndex
  • The icon index for the shortcut.

  • Name
  • Name is used to identify this software element

  • Shortcut
  • The name of the shortcut to be created.

  • ShowCmd
  • The Show Command specifies the view state of the application window and is similar to the ShowWindow Windows function.

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

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

  • Target
  • The Shortcut target specifies the action to be taken when a shortcut is launched. This can reference a software feature or a file specification of directory specification.

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

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

  • WkDir
  • The name of the Win32_Property that has the path of the working directory for the shortcut.


    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_ShortcutAction
    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...