Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
Sajo Jacob wrote: TerminalServerAware should be set to No and Impersonate should be set to no, that should fix it. As I've mentioned before, making them non-impersonated might fix SQL Express but would break SQL Server. -- sig://boB http://joyofsetup.com/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
with SQL Server Express is to use the common SQLEXPRESS instance and use the database attach feature, that is, specifying AttachDBFilename or Initial File Name in the connection string. The database file is then only associated with the database server when the connection is open. This might be a good option if you don't need to support a remote SQL Server. If you have a relatively low-spec database you could also consider SQL Server Compact Edition, which is file-based and in-process (there is no actual server). It's very limited on SQL syntax and datatype support, though. Extension idea: There's no reason a custom action couldn't call LogonUser and ImpersonateLoggedOnUser to change who it's running as. (If it's not impersonated already, it's running as LocalSystem which has the TCB privilege necessary to call LogonUser on Windows 2000.) It could be possible to ask for alternate *Windows* login credentials to run these actions. You would have to be careful to call RevertToSelf on all possible exit paths to ensure that further custom actions using the same server process would run with the correct credentials, however. -- Mike Dimmick -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Sajo Jacob *Sent:* 23 March 2008 04:46 *To:* Bob Arnson *Cc:* wix-users@lists.sourceforge.net *Subject:* Re: [WiX-users] WiXSqlExtension issue on Vista with UAC SQL Server 2005 Express. In fact this issue also causes the Repair scenario to fail. Jacob On Sat, Mar 22, 2008 at 1:29 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation*will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boB http://joyofsetup.com/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
Sajo Jacob wrote: Any clues how to fix this? If SQL Express requires elevated privileges to drop a database, it works differently than SQL Server and will require a different CA to do so. It might be the same code but a new CA entry to be elevated. -- sig://boB http://joyofsetup.com/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
I think here is the issue, WiX code base- SQLExtension.wxs CustomAction Id=CreateDatabase BinaryKey=ScaExecute2 DllEntry=CreateDatabase Execute=deferred Return=check HideTarget=yes SuppressModularization=yes *TerminalServerAware=yes* / CustomAction Id=RollbackCreateDatabase BinaryKey=ScaExecute2 DllEntry=DropDatabase Execute=rollback Return=check HideTarget=yes SuppressModularization=yes *TerminalServerAware=yes* / CustomAction Id=DropDatabase BinaryKey=ScaExecute2 DllEntry=DropDatabase Execute=deferred Return=check HideTarget=yes SuppressModularization=yes *TerminalServerAware=yes* / CustomAction Id=ExecuteSqlStrings BinaryKey=ScaExecute2 DllEntry=ExecuteSqlStrings Execute=deferred Return=check HideTarget=yes SuppressModularization=yes *TerminalServerAware=yes* / CustomAction Id=RollbackExecuteSqlStrings BinaryKey=ScaExecute2 DllEntry=ExecuteSqlStrings Execute=rollback Return=check HideTarget=yes SuppressModularization=yes *TerminalServerAware=yes* / TerminalServerAware should be set to No and Impersonate should be set to no, that should fix it. Jacob On Thu, Apr 3, 2008 at 6:43 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: Any clues how to fix this? If SQL Express requires elevated privileges to drop a database, it works differently than SQL Server and will require a different CA to do so. It might be the same code but a new CA entry to be elevated. -- sig://boB http://joyofsetup.com/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
on Windows 2000.) It could be possible to ask for alternate *Windows* login credentials to run these actions. You would have to be careful to call RevertToSelf on all possible exit paths to ensure that further custom actions using the same server process would run with the correct credentials, however. -- Mike Dimmick -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Sajo Jacob *Sent:* 23 March 2008 04:46 *To:* Bob Arnson *Cc:* wix-users@lists.sourceforge.net *Subject:* Re: [WiX-users] WiXSqlExtension issue on Vista with UAC SQL Server 2005 Express. In fact this issue also causes the Repair scenario to fail. Jacob On Sat, Mar 22, 2008 at 1:29 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation*will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boB http://joyofsetup.com/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
SQL Server 2005 has a very extensive security model of its own. In order to drop a database, the connecting account needs CONTROL permission on the database. This permission is automatically granted to the database owner and implicitly to members of the sysadmin server role (CONTROL on a database is implied by CONTROL SERVER permission on the server). The BUILTIN\Administrators Windows security group is by default a member of the sysadmin server role. On Windows Vista the membership of this group is only expressed in the privileged token accessed through UAC, not in the low-privilege token. The modifying SQL custom actions are all executed deferred and impersonated. (As always, the custom tables built by the compiler are read and turned into appropriate deferred custom action data by the immediate actions, but the actual operations are performed by deferred actions as part of the installation transaction.) My understanding of the installation process under UAC was that even the create actions would not be elevated - are you testing by running from an elevated command prompt? I believe this will cause impersonated actions to be elevated. If you turned impersonation off this would help you for the local installation case - as the action then runs as LocalSystem, which is a member of BUILTIN\Administrators - but doesn't help for installation on a remote SQL Server, which some users of WiX may need (as LocalSystem authenticates as the machine on a domain network, but has no network credentials in a workgroup). That really leaves specifying a SQL Server login to connect, but this is turned off by default in the SQL Server Express installer and not recommended in full SQL Server as the password is sent 'in the clear'. It's only encrypted if the whole connection is encrypted, which requires that the server has an SSL certificate installed. Many sites may not want to enable SQL Server Authentication. I'm not sure there's a simple solution, because Windows Installer doesn't offer a way to impersonate any other user. I'm rapidly concluding that you can't reliably install SQL databases from Windows Installer. Any competent DBA will want to control layout of files on the database server's disks anyway. I think the best approach is to ship scripts and leave it up to the DBA to create the database. That's the approach I'm taking. Another approach would be to provide the database as a separate feature, so that the DBA or other administrator could run the MSI on the database server itself to install the database. Microsoft's recommendation with SQL Server Express is to use the common SQLEXPRESS instance and use the database attach feature, that is, specifying AttachDBFilename or Initial File Name in the connection string. The database file is then only associated with the database server when the connection is open. This might be a good option if you don't need to support a remote SQL Server. If you have a relatively low-spec database you could also consider SQL Server Compact Edition, which is file-based and in-process (there is no actual server). It's very limited on SQL syntax and datatype support, though. Extension idea: There's no reason a custom action couldn't call LogonUser and ImpersonateLoggedOnUser to change who it's running as. (If it's not impersonated already, it's running as LocalSystem which has the TCB privilege necessary to call LogonUser on Windows 2000.) It could be possible to ask for alternate Windows login credentials to run these actions. You would have to be careful to call RevertToSelf on all possible exit paths to ensure that further custom actions using the same server process would run with the correct credentials, however. -- Mike Dimmick _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sajo Jacob Sent: 23 March 2008 04:46 To: Bob Arnson Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] WiXSqlExtension issue on Vista with UAC SQL Server 2005 Express. In fact this issue also causes the Repair scenario to fail. Jacob On Sat, Mar 22, 2008 at 1:29 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the uninstallation will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
that further custom actions using the same server process would run with the correct credentials, however. -- Mike Dimmick -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Sajo Jacob *Sent:* 23 March 2008 04:46 *To:* Bob Arnson *Cc:* wix-users@lists.sourceforge.net *Subject:* Re: [WiX-users] WiXSqlExtension issue on Vista with UAC SQL Server 2005 Express. In fact this issue also causes the Repair scenario to fail. Jacob On Sat, Mar 22, 2008 at 1:29 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation* will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation* will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
SQL Server 2005 Express. In fact this issue also causes the Repair scenario to fail. Jacob On Sat, Mar 22, 2008 at 1:29 PM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation* will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) Which SQL server are you using? The general case is that the server itself has the permissions needed to manipulate the file system. -- sig://boBhttp://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
If it is by design, then there is a problem with using WiXSqlExtension for creating an installer for Vista/WS2008 because the *uninstallation* will fail is you attempt to uninstall the product from Add/remove programs because the custom actions to drop the database is getting executed as immediate, unless you make the users use an elevated command prompt and manually uninstall the product. (if you created a database using WiXSqlExtension and have sqlstrings to drop the database.) I am suspecting this issue might be only for the DropDatabase custom actions, since CreateDatabase seems to work fine with UAC turned on during the installation. The issue is only when it attempts to drop the database during uninstallation. Jacob On Wed, Mar 19, 2008 at 10:11 AM, Bob Arnson [EMAIL PROTECTED] wrote: Sajo Jacob wrote: I am using WiX 3.0.29.25, I am suspecting that the custom actions in WiXSqlExtension: CreateDatabase, DropDatabase, ExecuteSQLStrings and RollbackExecuteStrings are not getting deferred by default. I believe that's by design: The installing user's permission is needed because generally SQL Server uses Windows authentication. -- sig://boBhttp://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
Looks like the custom actions aren't attributed with Impersonate=no. Please file a bug on http://sf.net/projects/wix. Also, that is an older WiX version. When fixed you'll need to download updates from http://wix.sf.net/releases. Sajo Jacob wrote: I am using WiX 3.0.29.25 http://3.0.29.25, I am suspecting that the custom actions in WiXSqlExtension: CreateDatabase, DropDatabase, ExecuteSQLStrings and RollbackExecuteStrings are not getting deferred by default. When I attempt to uninstall the product from Vista with UAC turned on, the installer complains about not having permissions to remove the mdf specifically. I attempted the uninstall from an elevated command prompt and the uninstall completed successfully. Is there a solution to this? Jacob - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Heath Stewart Deployment Technology Group, Microsoft http://blogs.msdn.com/heaths - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
I did go ahead and file a bug, In the meanwhile, is there a work around fix I can use for this? Jacob On Wed, Mar 19, 2008 at 2:42 AM, Heath Stewart [EMAIL PROTECTED] wrote: Looks like the custom actions aren't attributed with Impersonate=no. Please file a bug on http://sf.net/projects/wix. Also, that is an older WiX version. When fixed you'll need to download updates from http://wix.sf.net/releases. Sajo Jacob wrote: I am using WiX 3.0.29.25 http://3.0.29.25, I am suspecting that the custom actions in WiXSqlExtension: CreateDatabase, DropDatabase, ExecuteSQLStrings and RollbackExecuteStrings are not getting deferred by default. When I attempt to uninstall the product from Vista with UAC turned on, the installer complains about not having permissions to remove the mdf specifically. I attempted the uninstall from an elevated command prompt and the uninstall completed successfully. Is there a solution to this? Jacob - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Heath Stewart Deployment Technology Group, Microsoft http://blogs.msdn.com/heaths - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiXSqlExtension issue on Vista with UAC
Sajo Jacob wrote: I am using WiX 3.0.29.25 http://3.0.29.25, I am suspecting that the custom actions in WiXSqlExtension: CreateDatabase, DropDatabase, ExecuteSQLStrings and RollbackExecuteStrings are not getting deferred by default. I believe that's by design: The installing user's permission is needed because generally SQL Server uses Windows authentication. -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users