[英]Replacing strings in a PowerShell file and then calling it via batch + command line arguments
[英]Starting a powershell command via a batch file
目前正在使用批處理文件。 當 .bat 運行時 1. 打開特定網站頁面 2. 在目錄中運行 powershell。
當我啟動.bat時,有什么方法可以在powershell中自動輸入命令?
這是我目前正在使用的,我想輸入命令“節點”。
@ECHO OFF
START "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" https://stackoverflow.com
START powershell.exe -noexit -command "cd 'C:\Users\[User]\Desktop\File Directory\File in File\File in File in File'"
沒關系,我想通了。 分號允許您鏈接命令。
@ECHO OFF
START "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" https://stackoverflow.com
START powershell.exe -noexit -command "cd 'C:\Users\[User]\Desktop\File Directory\File in File\File in File in File'"; "node ."
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.