本帖最后由 WHY 于 2019-2-21 09:54 编辑
test.bat 右键以管理员身份运行- @echo off
- for /f "delims=" %%i in ('wmic Process where "Name='Steam.exe'" get ExecutablePath^|find ":"') do (
- set "fd1=%%~dpiSteamapps\common\Counter-Strike Global Offensive\csgo\cfg"
- set "fd2=%%~dpiUserdata"
- )
-
- start "" "%fd1%"
- start "" "%fd2%"
-
- mshta "javaScript:objShell=new ActiveXObject('WScript.Shell');objLink=objShell.CreateShortcut(objShell.SpecialFolders('desktop')+'\\CFG.LNK');objLink.TargetPath='%fd1:\=\\%';objLink.Save();close()"
- mshta "javaScript:objShell=new ActiveXObject('WScript.Shell');objLink=objShell.CreateShortcut(objShell.SpecialFolders('desktop')+'\\Userdata.LNK');objLink.TargetPath='%fd2:\=\\%';objLink.Save();close()"
-
- reg add HKCR\.cfg /ve /d "txtfile" /f
- reg add HKCR\txtfile\shell\open\command /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\notepad.exe %%1" /f
-
- pause
复制代码
|