Re: [WiX-users] uninstall fails to drop database, iis objects
Amy, I am working on an install which should install a new instance every time the user runs a install again. I am asking for the user Input (website name) every time he installs a new instance. Can you tell me how are you doing the new install every time ? Are you taking user input, every time he wants to install a new instance ?. Any code snippet will be very helpful. I dont have good insight of embeded transforms yet. Thanks, siaj Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@...http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=1674733i=0] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@...http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=1674733i=1] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009 / sql:SqlScript Id=CreateStoredProceduresWA ExecuteOnInstall=yes BinaryKey=iVantage50StoredProcedures.sql Sequence=010 / !--Create Logins-- sql:SqlString Id=DropLoginIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=011 / sql:SqlString Id=CreateIVantageApplicationLoginWA ExecuteOnInstall=yes SQL=CREATE LOGIN [SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]', DEFAULT_DATABASE = [DATABASENAME] Sequence=012 / !--Create Users and Assign to Roles in the database-- sql:SqlString Id=DropUserIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER [SQLAPPLICATIONLOGIN] Sequence=013 / sql:SqlString Id=CreateIVantageApplicationUserWA ExecuteOnInstall=yes SQL
Re: [WiX-users] uninstall fails to drop database, iis objects
OK, from the verbose log, for the components in question I see: MSI (s) (6C:20) [14:27:24:761]: Disallowing uninstallation of component: {5F9A10EE-72B1-11DC-8314-0800200C9A66} since another client exists So in order to resolve this, do I need to transform component guids since I have side by side installations? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 6:23 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Verbose log file? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 14:33 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects When I look through my registry under HKLM\Software\Microsoft\Windows\CurrentVersion\UserData\[MY USER SID] I don't see any of the database components or IIS components for any of my side by side installations (not the installed copies or the uninstalled copies). Is there somewhere else I could be looking? A -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 1:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009
Re: [WiX-users] uninstall fails to drop database, iis objects
Changing the GUIDs should do the trick. That way, they will be individually ref counted. However, you need to be sure that the key paths are unique and I'm not exactly sure what constitutes the key paths for such items. Best bet is to test it and see what happens. -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Friday, December 19, 2008 1:42 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects OK, from the verbose log, for the components in question I see: MSI (s) (6C:20) [14:27:24:761]: Disallowing uninstallation of component: {5F9A10EE-72B1-11DC-8314-0800200C9A66} since another client exists So in order to resolve this, do I need to transform component guids since I have side by side installations? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 6:23 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Verbose log file? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 14:33 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects When I look through my registry under HKLM\Software\Microsoft\Windows\CurrentVersion\UserData\[MY USER SID] I don't see any of the database components or IIS components for any of my side by side installations (not the installed copies or the uninstalled copies). Is there somewhere else I could be looking? A -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 1:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey
Re: [WiX-users] uninstall fails to drop database, iis objects
Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009 / sql:SqlScript Id=CreateStoredProceduresWA ExecuteOnInstall=yes BinaryKey=iVantage50StoredProcedures.sql Sequence=010 / !--Create Logins-- sql:SqlString Id=DropLoginIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=011 / sql:SqlString Id=CreateIVantageApplicationLoginWA ExecuteOnInstall=yes SQL=CREATE LOGIN [SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]', DEFAULT_DATABASE = [DATABASENAME] Sequence=012 / !--Create Users and Assign to Roles in the database-- sql:SqlString Id=DropUserIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER [SQLAPPLICATIONLOGIN] Sequence=013 / sql:SqlString Id=CreateIVantageApplicationUserWA ExecuteOnInstall=yes SQL=CREATE USER [SQLAPPLICATIONLOGIN] FOR LOGIN [SQLAPPLICATIONLOGIN] Sequence=014 / sql:SqlString Id=AssignIVantageApplicationUserToRoleWA ExecuteOnInstall=yes SQL=sp_addrolemember 'db_owner', '[SQLAPPLICATIONLOGIN]' Sequence=015 / !--On Uninstall Only-- sql:SqlString Id=DisconnectUsersFromDatabaseWA ExecuteOnUninstall=yes ExecuteOnInstall=no SQL=ALTER DATABASE [DATABASENAME] SET SINGLE_USER with ROLLBACK IMMEDIATE Sequence=901/ sql:SqlString Id=DropLoginIfExistsIninstallWA ExecuteOnUninstall=yes ExecuteOnInstall=no RollbackOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=902 / /sql:SqlDatabase /Component My IIS components are as follows: iis:WebApplication Id=MainWebApplication Name=[IISWEBAPPLICATIONNAME] WebAppPool=WebAppPool / iis:WebDirProperties Id=WebDirPropertiesAnonymous AnonymousAccess=yes AnonymousUser=InstallUser Write=yes DefaultDocuments=Default.aspx Execute=yes Read=yes Script=yes AspDetailedError=yes / DirectoryRef Id=TARGETDIR !--These components can be shared across multiple IIS6 Components-- Component Id=CreateUser Guid=5f36c780-e62b-11dc-95ff-0800200c9a66 Condition![CDATA[IISMJRVRSN=#6]]/Condition util:User
Re: [WiX-users] uninstall fails to drop database, iis objects
Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009 / sql:SqlScript Id=CreateStoredProceduresWA ExecuteOnInstall=yes BinaryKey=iVantage50StoredProcedures.sql Sequence=010 / !--Create Logins-- sql:SqlString Id=DropLoginIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=011 / sql:SqlString Id=CreateIVantageApplicationLoginWA ExecuteOnInstall=yes SQL=CREATE LOGIN [SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]', DEFAULT_DATABASE = [DATABASENAME] Sequence=012 / !--Create Users and Assign to Roles in the database-- sql:SqlString Id=DropUserIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER [SQLAPPLICATIONLOGIN] Sequence=013 / sql:SqlString Id=CreateIVantageApplicationUserWA ExecuteOnInstall=yes SQL=CREATE USER [SQLAPPLICATIONLOGIN] FOR LOGIN [SQLAPPLICATIONLOGIN] Sequence=014 / sql:SqlString Id=AssignIVantageApplicationUserToRoleWA ExecuteOnInstall=yes SQL=sp_addrolemember 'db_owner', '[SQLAPPLICATIONLOGIN]' Sequence=015 / !--On Uninstall Only-- sql:SqlString Id=DisconnectUsersFromDatabaseWA ExecuteOnUninstall=yes ExecuteOnInstall=no SQL=ALTER DATABASE [DATABASENAME] SET SINGLE_USER with ROLLBACK IMMEDIATE Sequence=901/ sql:SqlString Id=DropLoginIfExistsIninstallWA ExecuteOnUninstall=yes ExecuteOnInstall
Re: [WiX-users] uninstall fails to drop database, iis objects
1. The verbose log file will have a section that tells you the Installed and Action states for your Components. That's how you know what the installer is going to do. 2. Yep. If another product is still installed, the shared Components are not removed. -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:54 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009 / sql:SqlScript Id=CreateStoredProceduresWA ExecuteOnInstall=yes BinaryKey=iVantage50StoredProcedures.sql Sequence=010 / !--Create Logins-- sql:SqlString Id=DropLoginIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=011 / sql:SqlString Id=CreateIVantageApplicationLoginWA ExecuteOnInstall=yes SQL=CREATE LOGIN [SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]', DEFAULT_DATABASE = [DATABASENAME] Sequence=012 / !--Create Users and Assign to Roles in the database-- sql:SqlString Id=DropUserIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER [SQLAPPLICATIONLOGIN] Sequence=013 / sql:SqlString Id=CreateIVantageApplicationUserWA ExecuteOnInstall=yes SQL=CREATE USER [SQLAPPLICATIONLOGIN
Re: [WiX-users] uninstall fails to drop database, iis objects
When I look through my registry under HKLM\Software\Microsoft\Windows\CurrentVersion\UserData\[MY USER SID] I don't see any of the database components or IIS components for any of my side by side installations (not the installed copies or the uninstalled copies). Is there somewhere else I could be looking? A -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 1:54 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Rob, That's a really good question. I'm not entirely sure where to check to make sure they are uninstalled, however, it made me wonder about something. I have a requirement for my company that I must be able to install multiple instances of our application side by side. I have embedded transforms to achieve this, and as such the product guid is different every time I install. However, these component guids are not different. Could that have anything to do with it? A -Original Message- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Thursday, December 18, 2008 1:36 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] uninstall fails to drop database, iis objects Are the Components actually being uninstalled? -Original Message- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, December 18, 2008 12:33 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] uninstall fails to drop database, iis objects Hi All, My installer is having a problem that didn't used to occur. My install copies files, creates a virtual directory, app pool, local windows user, database and login within that database (amongst other things). When I execute the uninstall, the database, database login, iis virtual directory, iis app pool and web application do not get dropped. I am on the most recent weekly release of Wix 3.0.4813.0 I have attached below my database component, my IIS components, and excerpts from my log file which show that the UninstallSqlData is not executing any of my SqlString/SqlScript elements marked to execute on uninstall. The various properties utilized below are all set to the value used during installation before ValidateProductID. I can't think of why this stopped working. Is there something obvious that I am doing wrong? Any help anyone can offer would be greatly appreciated. Thanks, Amy My database component is as follows: Component Id=CreateDatabaseWindowsAuth Guid=aa332810-e625-11dc-95ff-0800200c9a66 Condition![CDATA[(SQLSERVERISLOCAL=true) AND (SQLUSEWINDOWSAUTH=checked)]]/Condition sql:SqlDatabase Id=IVantageDatabaseWA Server=[SQLSERVER] Database=[DATABASENAME] CreateOnInstall=yes DropOnUninstall=yes sql:SqlFileSpec Id=IVantageDatabaseFileWA Filename=[DataDirectory][DATABASENAME][DATABASEFILEEXT] Name=[DATABASENAME] / sql:SqlLogFileSpec Id=IVantageDatabaseLogFileWA Filename=[DataDirectory][DATABASENAME][DATABASELOGFILENAMEEXT][DATABASE LOGFILEEXT] Name=[DATABASENAME][DATABASELOGFILENAMEEXT] / !--ON INSTALL-- sql:SqlString Id=UseNewDatabaseWA ExecuteOnInstall=yes SQL=USE [DATABASENAME] Sequence=002 / !--Create database from scripts-- sql:SqlScript Id=CreateDefaultsWA ExecuteOnInstall=yes BinaryKey=iVantage50Defaults.sql Sequence=003 / sql:SqlScript Id=CreateRulesWA ExecuteOnInstall=yes BinaryKey=iVantage50Rules.sql Sequence=004 / sql:SqlScript Id=CreateUserDefinedTypesWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedDataTypes.sql Sequence=005 / sql:SqlScript Id=CreateTablesWA ExecuteOnInstall=yes BinaryKey=iVantage50Tables.sql Sequence=006 / sql:SqlScript Id=CreateForeignKeysWA ExecuteOnInstall=yes BinaryKey=iVantage50ForeignKeys.sql Sequence=007 / sql:SqlScript Id=CreateUserDefinedFunctionsWA ExecuteOnInstall=yes BinaryKey=iVantage50UserDefinedFunctions.sql Sequence=008 / sql:SqlScript Id=CreateViewsWA ExecuteOnInstall=yes BinaryKey=iVantage50Views.sql Sequence=009 / sql:SqlScript Id=CreateStoredProceduresWA ExecuteOnInstall=yes BinaryKey=iVantage50StoredProcedures.sql Sequence=010 / !--Create Logins-- sql:SqlString Id=DropLoginIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.syslogins where name='[SQLAPPLICATIONLOGIN]') DROP LOGIN [SQLAPPLICATIONLOGIN] Sequence=011 / sql:SqlString Id=CreateIVantageApplicationLoginWA ExecuteOnInstall=yes SQL=CREATE LOGIN [SQLAPPLICATIONLOGIN] WITH PASSWORD = '[SQLAPPLICATIONPASSWORD]', DEFAULT_DATABASE = [DATABASENAME] Sequence=012 / !--Create Users and Assign to Roles in the database-- sql:SqlString Id=DropUserIfExistsWA ExecuteOnInstall=yes SQL=if exists (select * from sys.sysusers where name='[SQLAPPLICATIONLOGIN]') DROP USER [SQLAPPLICATIONLOGIN] Sequence=013 / sql:SqlString Id=CreateIVantageApplicationUserWA