我有一个自定义操作,需要低于将安装文件夹中的某些部分复制到VS2010文件夹的值
VS2010DEVENV
属性)INSTALLLOCATION
属性)为了提供足够的权限,我将自定义操作设置为Execute='deferred' Impersonate='no'
.但是在运行安装程序时,它会记录以下消息:
无法从非立即自定义操作访问会话详细信息
看来我们无法在"延期"自定义操作中访问属性(即session["VS2010DEVENV"]
)
有没有其他方法可以根据需要检索这些值?
我正在使用TFS 2010 Team Build自定义构建流程模板的默认工作流程.有一个名为的活动FindMatchingFiles
允许搜索具有在MatchPattern
属性中定义的模式的特定文件.如果我只指定一个文件扩展名,它可以工作.例:
String.Format("{0}\\**\\\*.msi", SourcesDirectory)
Run Code Online (Sandbox Code Playgroud)
但我想包括*.exe.尝试以下模式,但它不起作用:
String.Format("{0}\\**\\\*.(msi|exe)", SourcesDirectory)
Run Code Online (Sandbox Code Playgroud)
任何人都可以告诉我如何纠正它?
在卸载过程中,安装程序将显示以下消息:
"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."
Run Code Online (Sandbox Code Playgroud)
我认为这是由于卸载时安装的服务仍在运行引起的。因此,我尝试编写一个自定义操作来停止它。但是,这似乎不起作用。
如果将动作设置为Execute='deferred' Impersonate='no'
,则仅允许我在InstallInitialize
和之间放置动作InstallFinalize
,因此我必须将其设置为“立即”。
<CustomAction BinaryKey='CustomActions' Id='StopService' DllEntry='StopService' Execute='immediate' />
<Custom Action="StopService" Before="InstallValidate">REMOVE="ALL"</Custom>
Run Code Online (Sandbox Code Playgroud)
另请注意,由于某些原因,我必须使用自定义操作来手动安装服务,而不是使用Wix。这就是为什么我试图手动将其删除。
我正在研究Wix来构建产品安装程序.我已成功定制UI,但想知道如何将自定义操作链接到控件事件(即PushButton).
我有2个项目:
Product.Wix.CustomActions
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
session.Log("Begin CustomAction1");
MessageBox.Show("CustomActions1");
return ActionResult.Success;
}
Run Code Online (Sandbox Code Playgroud)
Product.Wix.Setup(引用Product.Wix.CustomActions项目).在Setup.wxs中,我声明了一个自定义操作:
<Binary Id="CustomActions" SourceFile="..\Product.Wix.CustomActions\bin\Debug\Product.Wix.CustomActions.CA.dll" />
<CustomAction Id='Action1' BinaryKey='CustomActions' DllEntry='CustomAction1' Execute='immediate' Return='check' />
Run Code Online (Sandbox Code Playgroud)
我有一个带有连接按钮的自定义对话框,并连接到操作,如下所示:
<Control Id="Connect" Type="PushButton" X="325" Y="75" Width="30" Height="17" Text="...">
<Publish Event="DoAction" Value="Action1">1</Publish>
</Control>
Run Code Online (Sandbox Code Playgroud)
它不起作用,因为我预期它应该在单击Connect按钮时弹出一个消息框.