使用msiexec静默安装MSI的问题,可能是语法问题? [英] Issue installing MSI silently using msiexec, possible syntax issue?

查看:239
本文介绍了使用msiexec静默安装MSI的问题,可能是语法问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想以静默方式安装msi文件,并且可以使用以下行使其工作:

msiexec /i C:\Users\%username%\Downloads\mysqlODBC.msi /passive

我要添加的另一项是在该行的用户名部分添加双引号,以确保正确读取可能包含空格的所有用户名. ---->%username%"

One addition I would like to make is to add double quotes to the user name portion of the line to ensure any usernames that may contain spaces are read correctly. ----> "%username%"

问题是添加此文件时msi文件无法安装.在编写带有目录的批处理脚本时,我一直使用此功能.知道如何解决与msiexec一起使用的问题吗?

The issue is the msi file fails to install when I add this. I have always used this when writing batch scripts with directories. Any idea how this can be addressed to work with msiexec?

链接到我正试图悄悄安装的MSI文件:

https://dev.mysql.com/downloads/file/?id = 484649

推荐答案

网络安装点? :对我来说,您还不清楚要实现什么目标.您要在许多计算机上自动安装该MSI吗?如果是这样,您应该创建可通过UNC路径访问的网络安装点,然后运行 管理映像 提取所有文件并创建可用于所有计算机的网络安装点:

Network Installation Point?: It is not quite clear to me what you are trying to achieve. Do you want to automate the installation of this MSI on many machines? If so you should create a network installation point accessible via a UNC path and run an administrative image to extract all files and create a network installation point that can be used for all computers:

msiexec.exe /i "\\Server\Share\Setup.msi" /QN /L*V "C:\Temp\msilog.log"

如果您具有注入点,则实际上没有理由为每个用户创建一个文件夹.为什么要复制安装文件?当然,您不希望每个用户都下载安装程序吗?您想一次下载,进行恶意软件检查,然后完全依靠一次下载的内容吗?

If you have that instillation point there really is no reason to make a folder for each user. Why duplicate installation files? Surely you don't want each user to download the installer? You would want to download once, malware check and then rely on what you downloaded once and for all?

无论如何,如果您坚持要这样做:

Anyway, if you insist:

msiexec.exe /i "\\Server\Share\%username%\Setup.msi" /QN /L*V "C:\Temp\msilog.log"

快速参数说明 :

Quick Parameter Explanation:

 /i = run install sequence 
 /QN = run completely silently
 /L*V "C:\Temp\msilog.log"= verbose logging at specified path

msiexec.exe :有关此问题的更多详细信息,请参见 msiexec.exe 命令行: MSIEXEC qn和安静之间有什么区别 .它有两种不同的风格-两套不同的开关:旧样式和一些较新的更友好"版本.我只使用旧样式的开关. 有一个可用于生成命令行的工具.

某些链接 :

Some Links:

  • Customize msiexec progress bar?
  • How to install an MSI silently

这篇关于使用msiexec静默安装MSI的问题,可能是语法问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆