![](/img/trans.png)
[英]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.