我想在一個批處理文件中運行多個命令。如何在一個批處理文件中運行多個命令?
我試過了&,& &,開始,/等待,調用,:開始和結束開始命令,但沒有運氣。
這裏是我的命令:
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' – Stephan