Luke Smith Write today, wrong tomorrow

Batch build your Sidebar Gadget

I was looking for a way to build a sidebar gadget, rather than manually creating a
zip file (changing to a .gadget extension) and then copy the files needed into the
.gadget. A quick Google came up with this MSDN article 'Build
your own Vista Sidebar Gadget
' with a handy section 'Packaging
your gadget
'. Included is some batch code for creating the gadget file with the
necessary files and copying it to the Gadget directory. I've made a simple tweak to
it to take the gadget name as a parameter.

@echo on  rem ** remove/create a test gadget folder rd "%LOCALAPPDATA%MicrosoftWindows SidebarGadgets%1" /s /q md "%LOCALAPPDATA%MicrosoftWindows SidebarGadgets%1"  rem ** copy all of the files into test area xcopy . "%LOCALAPPDATA%MicrosoftWindows SidebarGadgets%1" /y /s /q /EXCLUDE:exclude.txt  rem cd "%LOCALAPPDATA%MicrosoftWindows SidebarGadgets%1" rem cabarc -r -p n "%HOMEPATH%Documents%1" *


Add an external tool in visual studio to give you a 2 click building process of your


comments powered by Disqus