Windows 为什么不是';我的批处理文件不工作吗?MsiExec+;批处理
我的批处理脚本代码不起作用。执行上面的msiexec.exe命令需要管理员权限 我曾尝试右键单击批处理脚本并以管理员身份运行,但这不起作用,但当我打开管理命令提示符并运行Windows 为什么不是';我的批处理文件不工作吗?MsiExec+;批处理,windows,batch-file,windows-installer,Windows,Batch File,Windows Installer,我的批处理脚本代码不起作用。执行上面的msiexec.exe命令需要管理员权限 我曾尝试右键单击批处理脚本并以管理员身份运行,但这不起作用,但当我打开管理命令提示符并运行 @echo off color b Echo Installing start /wait msiexec.exe /l*v "log.log" /qn /i installer.msi Echo Done! timeout 2 它确实有效。我尝试过在上面的命令上运行/a开关,如下所示: start /wait msiexe
@echo off
color b
Echo Installing
start /wait msiexec.exe /l*v "log.log" /qn /i installer.msi
Echo Done!
timeout 2
它确实有效。我尝试过在上面的命令上运行/a开关,如下所示:
start /wait msiexec.exe /l*v "log.log" /qn /i installer.msi
这也不管用
任何帮助都会很好,谢谢。您的一般问题是没有使用完整的明确路径
msiexec.exe/l*v“c:\somewhere\log.log”/qn/i“c:\somewhere\installer.msi”
。不需要start…,我强烈建议编写start”“/WAIT…
,因为start
命令可能会将第一个带引号的字符串解释为窗口标题,而不是其他内容(路径,…);”
强制start
使用空标题;并请提供客户的具体问题标题;“为什么我的批处理文件不能工作?”不是很具体。。。非常感谢。
start /wait msiexec.exe /l*v "log.log" /qn /i /a installer.msi