谷歌浏览器崩溃,通过bat快捷方式属性修改

@echo off

set "target=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "shortcut=C:\Users\Public\Desktop\Google Chrome.lnk"

set "workingDir=C:\Program Files\Google\Chrome\Application"      REM 替换为要设置的工作目录(可选)
set "arguments=--no-sandbox"                   REM 替换为要传递给目标文件的参数(可选)

echo Set oShell = CreateObject("WScript.Shell") > "%temp%\create_shortcut.vbs"
echo Set oShortcut = oShell.CreateShortcut("%shortcut%") >> "%temp%\create_shortcut.vbs"
echo oShortcut.TargetPath = "%target%" >> "%temp%\create_shortcut.vbs"
echo oShortcut.WorkingDirectory = "%workingDir%" >> "%temp%\create_shortcut.vbs"
echo oShortcut.Arguments = "%arguments%" >> "%temp%\create_shortcut.vbs"
echo oShortcut.Save >> "%temp%\create_shortcut.vbs"

cscript //nologo "%temp%\create_shortcut.vbs"
del "%temp%\create_shortcut.vbs"

pause

你可能感兴趣的:(运维)