Here are 2 source codes
1 my plugin installer deinstaller
http://www.dse.nl/~ridder/sourceplug.zip
2 An loose installer for you plugin,
check the form_load section to change the settings,
this is you can also use for c but i strongly advice you don't use for c. use a different installer.
http://www.dse.nl/~ridder/ownpluginiinstall.zip
Have fun