Invoke Shell Verb plugin: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "== InvokeShellVerb Plugin for NSIS (2010-02-09) == This plugin can invoke a shell object's verb. Version: 1.0 (2010-02-09) * initial release === Functions === InvokeShellVer...")
 
(Added version 1.1)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
== InvokeShellVerb Plugin for NSIS (2010-02-09) ==
== InvokeShellVerb Plugin for NSIS (2011-02-09) ==


This plugin can invoke a shell object's verb.
This plugin can invoke a shell object verb's DoIt method.


Version: 1.0 (2010-02-09)
Version: 1.0 (2011-02-09)
* initial release
* initial release
Version: 1.1 (2019-04-22)
* Added ability to invoke a verb by name instead of by resource ID if needed


=== Functions ===
=== Functions ===


  InvokeShellVerb::DoIt dir_path file_name resource_id
  InvokeShellVerb::DoIt dir_path file_name resource_id|verb_name
  Pop $Var
  Pop $Var


Line 16: Line 18:
* dir_path - the parent directory of the file that will have DoIt called on its verb.
* dir_path - the parent directory of the file that will have DoIt called on its verb.
* file_name - the file name of the file that will have DoIt called on its verb.
* file_name - the file name of the file that will have DoIt called on its verb.
* reource_id - the resource id of the verb label's string used to identify the verb on the shell object.
* resource_id - the resource id of the verb label's string used to identify the verb on the shell object; pass either this OR verb_name.
* verb_name - the string name of the verb to invoke on the shell object; pass either this OR resource_id and avoid using this parameter when a resource ID is available.


Returns:
Returns:
Line 32: Line 35:
=== Download ===
=== Download ===


* Current Release: 2010-02-09
* Current Release: 2019-04-22
<attach>InvokeShellVerb-1.1.zip</attach> (Unicode and ANSI)
 
* Previous versions
<attach>InvokeShellVerb-1.0.zip</attach> (Unicode and ANSI)
<attach>InvokeShellVerb-1.0.zip</attach> (Unicode and ANSI)



Latest revision as of 18:06, 22 April 2019

InvokeShellVerb Plugin for NSIS (2011-02-09)

This plugin can invoke a shell object verb's DoIt method.

Version: 1.0 (2011-02-09)

  • initial release

Version: 1.1 (2019-04-22)

  • Added ability to invoke a verb by name instead of by resource ID if needed

Functions

InvokeShellVerb::DoIt dir_path file_name resource_id|verb_name
Pop $Var

Calls DoIt on a shell object's verb. The verb is identified by its label's string and the string used to compare is loaded from shell32.dll using the reource_id parameter so it will work with the OS's locale.

Params:

  • dir_path - the parent directory of the file that will have DoIt called on its verb.
  • file_name - the file name of the file that will have DoIt called on its verb.
  • resource_id - the resource id of the verb label's string used to identify the verb on the shell object; pass either this OR verb_name.
  • verb_name - the string name of the verb to invoke on the shell object; pass either this OR resource_id and avoid using this parameter when a resource ID is available.

Returns:

  • 'success' if the calling DoIt on the verb succeeded.
  • 'method failed' if any of the COM calls fail.
  • 'invalid resource' if the resource id was not found in shell32.dll.
  • 'invalid directory' if the IShellDispatch NameSpace call failed.
  • 'invalid file' if the Folder ParseName call failed.
  • 'verb not found' if the verb was not found on the shell object.

Example

See Examples\InvokeShellVerb\Example.nsi

Download

  • Current Release: 2019-04-22

InvokeShellVerb-1.1.zip (11 KB) (Unicode and ANSI)

  • Previous versions

InvokeShellVerb-1.0.zip (10 KB) (Unicode and ANSI)

License

© 2011 Robert Strong

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any distribution.