谁能帮我创建一个与我编写的 Windows PowerShell 脚本等效的 Windows 批处理脚本。我知道前几行应该是什么,但我不确定其余的。
PowerShell代码:
Get-Process -Name Firefox | Stop-Process
Start-Process -FilePath "C:\Program Files\Mozilla Firefox\uninstall\helper.exe" -ArgumentList "-ms" -ErrorAction SilentlyContinue -PassThru | Wait-Process -Timeout 30
Start-Process -FilePath "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" -ArgumentList "-ms" -ErrorAction SilentlyContinue -PassThru | Wait-Process -Timeout 30
$UserProfiles = Get-ChildItem -Path "C:\Users" -Exclude "Public", "Default"
foreach ($Profile in $UserProfiles) {
Remove-Item -Path "$Profile\AppData\Roaming\Mozilla\Firefox" -Force -Recurse -ErrorAction SilentlyContinue -Confirm:$false
}
批号:
taskill Firefox
"C:\Program Files\Mozilla Firefox\uninstall\helper.exe" -ms
"C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" -ms
...