Windows – How to install a gadget to a user’s desktop programmatically

inno-setupwindows 7windows-desktop-gadgets

Is is possible to install a gadget to a user's desktop somehow? I believe I need to copy all the files to a the user's gadget folder, e.g.

C:\Users\curusername\AppData\Local\Microsoft\Windows Sidebar\Gadgets\test.gadget

But copying the files here doesn't run the gadget. How can I register/activate it?

Is it enough to shell execute test.gadget?

Best Answer

The following MSDN Article covers this:

http://msdn.microsoft.com/en-us/library/cc982277(VS.85).aspx