locked
Enable/Disable SideShow Gadgets ouside of Control Panel?

    Question

  • Is there a way to enable and disable SideShow Gadgets ouside of the SideShow Control Panel?

    Thanks

    Friday, March 02, 2007 1:01 AM

Answers

  • There is no way to enable/disable gadgets outside of the Control Panel(*).  This is for security and privacy reasons; because gadgets can potentially be providing users' private data to the device, the user must opt in to having this happen.  There are a number of things that happen when gadgets are enabled and disabled that require it to be done through the Control Panel.  Trying to circumvent that process will result in undefined behavior.

    (*) There is one exception to this statement; device manufacturers can automatically enable gadgets for their particular device.  This is done via the ISideShowDriver::OnGetPreEnabledApplications method in the driver implementation.  The manufacturer must supply the Application and Endpoint IDs to be enabled.  Since IDs must be known ahead of time, only specific gadgets may be pre-enabled.

    I'm curious to know what the scenario is for enabling/disabling gadgets outside of the Control Panel?

    Friday, March 02, 2007 1:36 PM

All replies

  • Hi Steven,

    Please note that this is probably unsupported.

    After playing around with ProcMon (download from technet) and my Momento Digitial Photo Frame I discovered that a few registry entries are changed when you enable/disable a gadget.

    In HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\{device ID}\UMB\{second device ID}\Device Parameters\WindowsSideShow

    You will notice registry pairs for each SideShow gadget currently installed.  The DWORD value for on is '1' and off is '0'.  If you ensure that both values are the same then you should be able to enable-disable the gadgets in the SideShow Control Panel automatically.  Unfortunately, this only works half-way. 

    Although it changes the values it does not force the SideShow framework to push the new content to the device.  I'm not sure how to progress from here.  Perhaps trying to get hold of the handle to ISideShowDriver for each device in question and then send the content that way or hosting the Windows SideShow control panel in your own application.  Maybe there are some methods available in an undocumented SideShow api to help you do this.

    Either way, the registry changes are only the first step.  I will continue to dig to see if I find anything else.

    This may change per device as I have only tested on Momento.

    Friday, March 02, 2007 8:49 AM
  • There is no way to enable/disable gadgets outside of the Control Panel(*).  This is for security and privacy reasons; because gadgets can potentially be providing users' private data to the device, the user must opt in to having this happen.  There are a number of things that happen when gadgets are enabled and disabled that require it to be done through the Control Panel.  Trying to circumvent that process will result in undefined behavior.

    (*) There is one exception to this statement; device manufacturers can automatically enable gadgets for their particular device.  This is done via the ISideShowDriver::OnGetPreEnabledApplications method in the driver implementation.  The manufacturer must supply the Application and Endpoint IDs to be enabled.  Since IDs must be known ahead of time, only specific gadgets may be pre-enabled.

    I'm curious to know what the scenario is for enabling/disabling gadgets outside of the Control Panel?

    Friday, March 02, 2007 1:36 PM
  • Thanks for the quick response!

    I am looking to be able to control a whole suite of Gadgets at once, akin to install/uninstall for an application with a target device selection to simplify the User experience.

    The registry hack was making me nervous because of the multiple ControlSets (ControlSet001, ControlSet002,  & CurrentControlSet).

    -Steven
    Friday, March 02, 2007 4:47 PM
  • Interesting idea, but unfortunately not possible with Windows Vista unless it happens from the device side (as I described above).  We'll consider this request for future revisions, though.

    Dan

    Monday, March 05, 2007 9:55 AM