在 WIX 中获取 SQL Server 实例名称?
使用 WIX 我想知道目标计算机上安装了 SQL Server 的哪个实例。如果已安装,请获取名称并将其设置为要在我的自定义对话框中显示的属性值之一。
我使用以下代码来查找是否安装了 SQL Server 并使用 SQLSERVER 属性来设置我的控件的值,但它显示为空:
<Property Id="SQLSERVER"><RegistrySearch Id="SQLServer" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw" Name="InstalledInstances"/></Property><Condition Message="Error: This application requires Microsoft SQL Server 2005/2008 to be installed. Please install Microsoft SQL Server 2005/2008 and run this installer again.">SQLSERVER</Condition>
自定义对话框:
<Control Type="Edit" Id="txtInstanceName" Width="150" Height="15" X="22" Y="139" Property="SQLSERVER" Text="[SQLSERVER]" />
有人可以指导我在这里做错了什么吗?谢谢!
Using WIX i would like to know what instance of SQL Server is installed on target machine. If installed, get the name and set it as one of the property value to be displayed in my custom dialog.
I am using the following code to find if SQL Server is installed and using SQLSERVER property to set the my control's value, but its coming up as empty:
<Property Id="SQLSERVER"><RegistrySearch Id="SQLServer" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw" Name="InstalledInstances"/></Property><Condition Message="Error: This application requires Microsoft SQL Server 2005/2008 to be installed. Please install Microsoft SQL Server 2005/2008 and run this installer again.">SQLSERVER</Condition>
Custom Dialog:
<Control Type="Edit" Id="txtInstanceName" Width="150" Height="15" X="22" Y="139" Property="SQLSERVER" Text="[SQLSERVER]" />
Can someone please guide me what am I doing wrong here? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是此处记录的错误:http://support.microsoft.com/kb/897026
It's a bug documented here: http://support.microsoft.com/kb/897026