【发布时间】:2015-09-23 07:31:36
【问题描述】:
我想在一个批处理文件中运行多个命令。
我尝试了 &、&&、start、/wait、call、:begin 和 goto begin 命令,但没有成功。
这是我的命令:
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
sc config remoteregistry start= auto
sc start remoteregistry
sc config Schedule start=auto
sc start Schedule
sc stop McAfeeFramework
sc configure McAfeeFramework startup= disabled
sc stop McShield
sc configure McShield startup= disabled
sc stop McTaskManager
sc configure McTaskManager startup= disabled
netsh advfirewall set AllProfiles state off
sc stop MpsSvc
sc config MpsSvc start= disabled
【问题讨论】:
-
不知道你的意思 - 这些不是多个命令吗?你是说同时吗?
-
是的 cmd 不想在双击或以管理员身份运行时全部运行它们,但它只运行第一个。
-
只运行第一行?见
cmd /?。特别关注/k与/c -
谢谢我管理我只是把 start 放在每个并行命令的开头:)
-
我建议@Stephan 将其评论转换为答案并由 OP 选择它,这样我们其他人就知道这个问题已经解决了......
标签: windows batch-file cmd