In case someone wonders, this was resolved quite trivially. The connection to a database was not dropped after attach script (for some reason). I could see this by the database status (Normal instead of Shutdown,Normal). Running a "SET OFFLINE" query before actual detach solved the problem. Discovered after more thorough investigation of Rob Mensching's reply: http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg18212.htm l :-)
Other details and more info around this topic is here: http://ysdevlog.blogspot.com/2009/01/attach-detach-database-during.html -- Yan -----Original Message----- From: Yan Sklyarenko [mailto:y...@sitecore.net] Sent: Friday, January 09, 2009 5:32 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Attach/Detach the database and RollbackOnUninstallproblem Hello WiX community, I have a serious problem and I hope to get a hint from you. My installation program must attach the database on Install and detach it on Uninstall. Hence, there must be two more scripts to run: during RollbackOnInstall (the same query as for uninstall) and during RollbackOnUninstall (the same query as for install). Everything works pretty well, except for one little scenario. When I install for the first time, it attaches the database (I use Windows Authentication). Then I try to test the scenario when uninstall fails (with msiexec /x WIXFAILWHENDEFERRED=1). It runs the uninstall as expected, detaches database and removes files, then hits the failure point and rolls back. Afterwards, I can see that the database was re-attached successfully. The physical MDF file contains the same set of security permissions. BUT, when afterwards I uninstall normally (removing WIXFAILWHENDEFERRED=1) right after detach action the permissions to MDF files are reduced to my logon account only, and the next action, RemoveFiles, obviously can't access it to remove. Does anyone know why this happens? Have anyone seen this behavior before? Please, help. Thanks a lot in advance. -- Yan ------------------------------------------------------------------------ ------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users