Windows shell commands
package require twapi
This module provides procedures related to the Windows shell.
The Windows shell identifies objects in its namespace, including non-file objects such as Control Panel applets and printers, using an item ID. Similar to a file system path, an object resides within the shell namespace object hierarchy and the entire path to the object is defined by item identifier list.
The command get_shell_folder returns the path to the directory specified by a Windows Shell CSIDL.
The command shell_object_properties_dialog displays the property page dialogs for the specified shell objects.
The commands OpenThemeData, CloseThemeData, IsThemeActive, IsAppThemed, GetCurrentThemeName, GetThemeColor and GetThemeFont provide access to information related to the current theme if the underlying platform supports themes. See the Windows SDK for documentation about these. TwapiThemeDefineValue is a utility function that translates various theme-related symbols described in the SDk to their integer values to be passed to the above functions.
The commands read_shortcut and write_shortcut allow reading and writing of shell shortcuts.
The commands read_url_shortcut and write_url_shortcut allow reading and writing of URL shortcuts. A URL shortcut can be invoked by invoke_url_shortcut.
|-allowui||Allows user interaction.|
|-hwin HWIN||Specifies the parent window handle for user interaction. This is ignored if -verb is specified or if -allowui is not specified.|
|-verb VERB||Specifies the verb to invoke on the shortcut, for example open, edit etc.|
|-args||Command line arguments for the link.|
|-desc||Description of the shortcut. This is the string that is visible to the user as the label of the shortcut.|
|-hotkey||The hotkey associated with the shortcut. This is an integer as described in the documentation of the IShellLink::Hotkey command in the Platform SDK.|
|-iconindex||The index of the icon within the icon file specifies by the -iconpath field.|
|-iconpath||The path to the file from which the icon for the shortcut is to be taken.|
|-idl||The item identifier list for the object pointed to by the shortcut.|
|-path||The file system path in the case that the shortcut points to a file.|
|-showcmd||The initial state of the window.|
|-workdir||The working directory of the shortcut.|
|-hwin HWIN||Identifies the window to be used as the parent of the dialog box that pops up to ask the user for more information when the shortcut cannot be resolved.|
|-install||Calls the MSI installer if the shortcut is an advertised shortcut and the target has not been installed yet.|
|-nolinkinfo||Disables distributed link tracking.|
|-nosearch||Normally, the command will search for the target if it cannot be found in the location pointed to by the shortcut. Specifying this option disables this search.|
|-notrack||Specifies that distributed link tracking to be not used.|
|-noui||Specifies that no dialog box should be displayed even if the link cannot be resolved.|
|-rawpath||Normally, the command resolves any embedded environment variables contained in the returned -path field and verifies the path exists. Specifying this option disables both these features and returns raw path contained in the shortcut.|
|-shortnames||The path contained in the returned -path field uses short name (8.3) format.|
|-timeout TIMEOUT||Specifies the timeout, in milliseconds, for resolving the link. This option has no effect unless the -noui is also specified.|
|-uncpath||The path contained in the returned -path field is in UNC format.|
|-hwin HWIN||If specified, HWIN is the handle to the window to be used as the parent for the dialog.|
|-page PAGENAME||Specifies the name of the property sheet page to be displayed. If unspecified, the default page is displayed.|
|-type file|printer|volume||Specifies the type of the object identified by OBJECTPATH. If this option is not specified, the command will attempt to figure out the object type and display the appropriate dialog.|
|-args ARGUMENTS||Specifies the command line arguments for the link.|
|-desc DESCRIPTION||Specifies the description of the shortcut. This is the string that is visible to the user as the label of the shortcut.|
|-hotkey HOTKEY||Specifies the hotkey to be associated with the shortcut. HOTKEY should be an integer as described in the documentation of the IShellLink::Hotkey command in the Platform SDK or a symbolic string as described in the register_hotkey command.|
|-iconindex INDEX||Specifies INDEX as the index of the icon within the icon file specifies by the -iconpath option.|
|-iconpath ICONPATH||Specifies ICONPATH as the path to the file from which the icon for the shortcut is to be taken.|
|-idl IDL||Specifies that the shortcut should point to the object identified by the item identifier list IDL. This is useful in cases where the target of the short cut is not a file.|
|-path TARGETPATH||Specifies TARGETPATH as the file system path that the shortcut to which the shortcut points.|
|-showcmd WINDOWSTATE||Specifies the initial state of the window. WINDOWSTATE should be one of minimized, maximized or normal.|
|-workdir DIRPATH||Specifies DIRPATH as the working directory of the shortcut.|
Copyright © 2004-2006 Ashok P. Nadkarni