DXInstance: command line & single instance plugin for DesktopX

This is a very small plugin for DesktopX that exposes command line information in your scripts, allowing you to act on certain parameters. It also adds a new callback that is called when another instance is started and gives you its command line arguments.


  • associate a gadget to a custom file type and be able to do custom processing when called with the file path as an argument.
  • make the "Tasks" category of the jump list in Windows 7 usable (they are shortcuts and supposed to be available even if the application is not running, so they need to be shortcuts to the single exe, not the extracted one).
  • handle any other custom command line arguments like a normal application.


Remember to select “Allow multiple instances of the application to run” when exporting your gadget!

Here are the new functions/callbacks available to your scripts:


Get the full command line (including the path to the executable and DesktopX-specific arguments)


Get an array of command line arguments. Command line arguments have been cleaned up to remove DesktopX-specific arguments (in the case of single-exe gadgets)


Will be True if this is the first instance to run, False otherwise. It is preferable to check for it at startup and close the gadget accordingly, as only the first instance will receive a callback message when a new instance is started.


Gets called when another instance is started. The command line arguments are passed in an array.


This plugin functionality is now part of the DXSystemEx plugin. You can get more information in this blog post.


Note: This plugin will not work with single-exe gadgets (or widgets)! Due to the way simple deployment gadget’s command line is handled, adding arguments will result in the gadget not even starting (it’s treating almost any command line argument as a path…). I sent a bug report/request to Stardock, but in the meantime, you will have to use custom deployment. I have a binary patch available for DXAppCustom.bin that fixes the command line parsing and allows gadgets to get the original command line (but disables ObjectBar-related code as it’s kind of a hack), so it’s definitely fixable. Let’s hope the next version of DX will have a fix.