我想修改MSI安装程序(通过WiX创建)以在卸载时删除整个目录.
我理解WiX中的选项RemoveFile和RemoveFolder选项,但是它们不够强大,无法递归删除安装后创建内容的整个文件夹.
我注意到类似的Stack Overflow问题在卸载WiX时删除文件,但我想知道是否可以通过调用批处理脚本删除文件夹来更简单地完成此操作.
这是我第一次使用WiX,而且我仍然掌握了自定义操作.在卸载时运行批处理脚本的自定义操作的基本示例是什么?
卸载我的应用程序时,我想配置Wix设置以删除原始安装后添加的所有文件.看起来卸载程序只删除了最初从MSI文件安装的目录和文件,并且它保留了稍后在应用程序文件夹中添加的所有其他内容.换句话说,我想在卸载时清除目录.我怎么做?
如果我在ASP.NET MVC中的自定义操作筛选器中创建一个对象
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
DetachedCriteria criteria = DetachedCriteria.For<Person>();
criteria.Add("stuff");
// Now I need to access 'criteria' from the Action.....
}
Run Code Online (Sandbox Code Playgroud)
有什么办法可以从当前正在执行的Action访问该对象.
使用Visual Studio 2008创建msi以使用安装项目部署我的程序.我需要知道如何使msi运行它刚刚安装的exe.自定义动作?如果是这样,请说明在哪里/如何.谢谢.
windows-installer custom-action setup-project visual-studio-2008 visual-studio
如何通过延迟自定义操作检索CustomActionData上设置的属性?
但是,我不知道如何在标准的django测试中测试它
我试图为Visual Studio Installer项目创建自定义操作以修改配置文件的权限.
Installer.cs如下:
public override void Commit(IDictionary savedState)
{
base.Commit(savedState);
// Get path of our installation (e.g. TARGETDIR)
//string configPath = System.IO.Path.GetDirectoryName(Context.Parameters["AssemblyPath"]) + @"\config.xml";
string configPath = @"C:\Program Files\Blueberry\Serial Number Reservation\config.xml";
// Get a FileSecurity object that represents the current security settings.
FileSecurity fSecurity = File.GetAccessControl(configPath);
//Get SID for 'Everyone' - WellKnownSidType works in non-english systems
SecurityIdentifier everyone = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
// Add the FileSystemAccessRule to the security settings.
fSecurity.AddAccessRule(new FileSystemAccessRule(everyone, FileSystemRights.Modify | FileSystemRights.Synchronize, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, …Run Code Online (Sandbox Code Playgroud) 在安装项目中,可以接受".exe,.dll,.js,.vbs"等可执行文件,但无法.bat在自定义操作中运行文件.
问题是如何*.bat在安装过程中运行文件?
installation custom-action batch-file setup-project visual-studio-2008
我有一个自定义操作,需要低于将安装文件夹中的某些部分复制到VS2010文件夹的值
VS2010DEVENV属性)INSTALLLOCATION属性)为了提供足够的权限,我将自定义操作设置为Execute='deferred' Impersonate='no'.但是在运行安装程序时,它会记录以下消息:
无法从非立即自定义操作访问会话详细信息
看来我们无法在"延期"自定义操作中访问属性(即session["VS2010DEVENV"])
有没有其他方法可以根据需要检索这些值?
我有一个使用Wxs 3.0创建的MSI文件.我的MSI引用了一个C#自定义操作,使用新的C#Custom Action项目编写.
我想将一个参数传递给msiexec,该参数被路由到我的自定义操作 - 例如:
msiexec/i MyApp.msi ENVIRONMENT = TEST#
在我的.wxs文件中,我引用了我的自定义操作:
<Property Id="ENVIRONMENT"/>
<Binary Id="WixCustomAction.dll" SourceFile="$(var.WixCustomAction.Path)" />
<CustomAction Id="WixCustomAction" BinaryKey="WixCustomAction.dll" DllEntry="ConfigureSettings"/>
<InstallExecuteSequence>
<Custom Action="WixCustomAction" After="InstallFiles"></Custom>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)
我的C#自定义操作设置如下:
[CustomAction]
public static ActionResult ConfigureSettings(Session session)
{
}
Run Code Online (Sandbox Code Playgroud)
我原以为能够像这样访问该物业:
string environmentName = session.Property ["ENVIRONMENT"];
但这似乎不起作用.
如何访问我在自定义操作中传递给msiexec的属性?
custom-action ×10
wix ×5
asp.net-mvc ×1
batch-file ×1
c# ×1
django ×1
django-admin ×1
filter ×1
install ×1
installation ×1
installer ×1
session ×1
testing ×1
wix3.5 ×1