我有oneclick.bat名爲控制器的批處理文件,代碼如下:如何在批處理腳本中運行powershell腳本和批處理腳本?
rem batch controller
rem wait for email input for ssh key generation...
rem call copyEnv.bat
call generateSshKey.bat %1
call gitClone.bat
在generateSshKey.bat,我開始PowerShell腳本是這樣的:
rem make sure powershell is able to run
powershell.exe set-executionpolicy remotesigned
rem start powershell and add ssh key to the server by ui aotumation
powershell.exe -noe -file SetSSHKeytoServer.ps1
然後gitClone.bat沒有在命令窗口中運行
我怎樣才能讓gitClone.bat運行?
謝謝@Adi Inbar;我需要按順序執行批處理腳本。 Ansgar Wiechers的答案適用於我。 – max