Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 为什么不是';我的批处理文件不工作吗?MsiExec+;批处理_Windows_Batch File_Windows Installer - Fatal编程技术网

Windows 为什么不是';我的批处理文件不工作吗?MsiExec+;批处理

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

我的批处理脚本代码不起作用。执行上面的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 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