相关疑难解决方法(0)

无提示安装MSI包

如果尚未安装软件包,我需要安装MSI软件包.我还需要安静地安装它.该软件包提示用户:

  • 安装位置(C:\ Program Files\Foobar)
  • 安装类型:最小和完整(最小)

我需要使用命令行参数或其他一些方法覆盖这两个参数.那么我该如何解决这两个问题呢.我将使用VBScript进行脚本编写.

windows-installer msiexec

77
推荐指数
2
解决办法
25万
查看次数

如何在Burn(WiX)中引用“重新启动待处理”属性

如何在刻录(WiX)引导程序中引用RebootPending属性?我知道属性名称是RebootPending,它实际上是在Windows Installer中引用MsiSystemRebootPending属性。

我目前正在尝试这样的事情:

<bal:Condition Message="There is a restart pending. Please restart your computer before  attempting to install !(loc.ProductName).">RebootPending = 0</bal:Condition>
Run Code Online (Sandbox Code Playgroud)

但是,即使Windows Update刚刚完成更新并需要重新启动,也总是如此。

我的语法错误吗?我的条件应该改为[RebootPending]吗?

在获知Burn内的RebootPending属性可能与Windows Installer使用的属性不完全对应之后,我还要如何确保我的应用程序在重新引导待处理时不尝试安装?

windows-installer wix burn wix3.6

5
推荐指数
1
解决办法
2838
查看次数

使用VBScript关闭应用程序

我试图打开并关闭一个应用程序.我试过这样的:

Dim App1 
Set App1 = CreateObject("WScript.Shell")
App1.Run("firefox")
App1.Quit
Run Code Online (Sandbox Code Playgroud)

Firefox将打开,但不会关闭.

错误信息:

object不支持此属性或方法

我提到InDesign Scripting如何退出应用程序(不是文档)

请告诉我关闭申请的程序.

vbscript

4
推荐指数
2
解决办法
5万
查看次数

Wix在卸载/升级时停止服务:防止“重新启动弹出窗口”(使用中文件的情况)

我遇到的问题是,在卸载(或升级)时,重新启动管理器抱怨某个文件正在使用中,因此强制重新启动:

RESTART MANAGER: Detected that application with id 7000, friendly name 'javaw.exe', of type RmCritical and status 1 holds file[s] in use.
RESTART MANAGER: Did detect that a critical application holds file[s] in use, so a reboot will be necessary.
Run Code Online (Sandbox Code Playgroud)

RESTART MANAGER抱怨的服务是基于Java的服务。服务(此处称为myservice.exe)以递归方式启动java子进程:

  myservice.exe-
   运行
      ↳javaw.exe --someArguments↳someother.exe
         --someArguments↳javaw.exe --someMoreArguments

服务定义的wix代码段:

<DirectoryRef Id="BINDIR">
        <Component Id="myservice.exe" Guid="PUT-GUID-HERE">
            <File Id="myservice.exe" KeyPath="yes" Vital="yes"
                  Source="SourceDir\bin\myservice.exe"/>
            <ServiceInstall Id="MyService" Type="ownProcess"
                            Vital="yes" Name="MyService" DisplayName="My Service"
                            Description="My Service" Start="auto" Account=".\LocalSystem"
                            ErrorControl="normal" Interactive="no" Arguments="--run"/>
            <ServiceControl Id="MyService" Name="MyService" Wait="yes" Remove="uninstall" Stop="uninstall" Start="install"/> …
Run Code Online (Sandbox Code Playgroud)

windows-installer wix restartmanager

4
推荐指数
1
解决办法
2350
查看次数

使用Ez文件锁定器锁定文件时RmGetList()API失败,但与另一个文件锁定实用程序一起使用

我遇到了一个与Restart Manager API有关的奇怪问题:RmGetlist().为了模拟文件锁定方案,我正在使用以下第三方文件锁定实用程序:

Ez文件柜 - http://www.xoslab.com/efl.html -

文件柜 http://www.jensscheffler.de/filelocker

这里的奇怪问题是,这两个实用程序都锁定了某个文件,但是,RMGetList()失败,带有第一个文件锁定实用程序(Ez文件锁定)的Access拒绝错误(5),而它与第二个文件锁定实用程序一起使用.

这可能有什么问题?为什么RmGetList()会因一个文件锁定实用程序失败而与另一个一起工作?

以下是正在使用的代码:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.IO;
using System.Windows.Forms;

namespace RMSession
{
    class Program
    {


        public static void GetProcessesUsingFiles(string[] filePaths)
        {
            uint sessionHandle;
            int error = NativeMethods.RmStartSession(out sessionHandle, 0, Guid.NewGuid().ToString("N"));
            if (error == 0)
            {
                try
                {
                    error = NativeMethods.RmRegisterResources(sessionHandle, (uint)filePaths.Length, filePaths, 0, null, 0, null);
                    if (error == 0)
                    {
                        RM_PROCESS_INFO[] processInfo = null;
                        uint pnProcInfoNeeded = 0, pnProcInfo = 0, …
Run Code Online (Sandbox Code Playgroud)

winapi restartmanager

3
推荐指数
1
解决办法
465
查看次数

当我们安装.exe文件时不要覆盖现有文件

我已经安装了 .exe 应用程序(例如版本 1.0)。安装应用程序后,我可以在本地路径(C:\Program Files (x86))中看到几个 DLL 和几个 .XML 配置文件。现在,在启动新版本并安装它之后,我不想单独覆盖本地路径中的现有 XML 文件。有什么办法可以做到吗?

我的 EXE 是使用 WIX 安装程序创建的,项目是在 Visual Studio 2015 中构建的。

c# windows-installer wix

1
推荐指数
1
解决办法
3450
查看次数

在安装时重新启动,在卸载时不重新启动

我们有一个安装程序,需要在安装时重新启动,但在卸载时也会重新启动。有什么方法可以防止卸载时重新启动吗?

这是我们目前所拥有的:

<InstallExecuteSequence>
  <ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)

提前谢谢了!

windows-installer wix wix3 major-upgrade

1
推荐指数
1
解决办法
922
查看次数

如何使用PowerShell运行安装程序?

我正在尝试安装一个软件,当手动完成时,您可以在完成整个过程时选择配置选项.我试图找到一种使用PowerShell自动化的方法,但我仍然坚持如何设置这些配置选项.我相信我需要在安装程序.exe上运行start-process命令,但我不知道从那里去哪里.我可以使用start-process命令中的参数来传递我想要的配置吗?

powershell automation install windows-installer

0
推荐指数
1
解决办法
3655
查看次数