my installer has feature called 'mydatabase' shows dialog take input 'server, dbname, user, pwd' , creates specified database.
it works first time installation. requirement show dialog everytime installer run , 'mydatabase' feature selected. user may choose create new database every time. if db exists display message , exit.
i managed show dialog every time, take input user. doesn't install db except first time.
how can install every time?
let me flesh out answer little: when install file msi points component guid. msi file thinks "owns" file since have given unique guid , happily delete file on uninstall (this can happen part of major upgrade), if have modified file , full of user data. common design-flaw in many setups.
you can work around setting component permanent described in answer: msi reference counting: 2 products install same msis. better concept install read-only files , use application initialize user-data (ini files, databases, xml settings files, etc...) copying read-only templates user profile , / or set them via application internal defaults (defined inside source code). decouples deployment of user-settings , data files installer avoiding accidental deletion of user data , allowing treat user data setup application increased flexibility , control yields. , avoid complicating setup, more complex enough described here: what benefit , real purpose of program installation?
many people feel setup should uninstall user data. don't go there. take on this, , many me, modified user user data , should left alone in case user reinstalls product or if want keep data import other applications. can instead document data stored , let people or system administrators clean out manually. cleaning out user data involve cleaning user profiles. though can use concepts such activesetup accomplish (another activesetup explanation), more trouble worth , error prone.
for more understanding of component guid concept see answer: change component guid in wix? (recommended read use case). here discussion on installsite.net on how initialize , update userprofile , user data: http://forum.installsite.net/index.php?showtopic=21552
similar answers (for tracking) - keep writing same on , on ;-):