1

I'm wrapping up a Windows Mobile (6.1) app I've written and everything goes fine and dandy, but I've got one nasty problem: My app needs a few registry keys for settings and I can create them in the installer (using the registry editor) fine, but my problem is that every time I run the installer to update a new version of the software it overwrites those registry values.

Is it possible to create a .cab installer that creates the specified registry keys if they don't exist, but leaves them alone if they do.

Also, am I correct if I assume the setup project automatically deletes all registry keys in uninstall that it created during install?

Thanks a bunch in advance!

Tommi Forsström
  • 1,467
  • 11
  • 18

2 Answers2

2

No custom DLL is necessary. Use the FLG_ADDREG_NOCLOBBER (0x00000002) in the INF entry for your reg key.

ctacke
  • 66,480
  • 18
  • 94
  • 155
2

I don't beleave you have that much control over regsitry setup in the installer INF.

What you need to do is create a setup dll which will give you all the control that you need to do whatever you want. The problem is that you have to write it in C or C++ but it should be easy enough as all you want to do is to setup registry keys.

Shane Powell
  • 13,698
  • 2
  • 49
  • 61