scrcpy-noconsole.vbs 562 B

123456789101112
  1. ' 在 VBS 所在目录执行 scrcpy.exe(先 cd 再带完整路径执行),保证双击即可运行且能加载同目录 dll
  2. Dim fso, scriptDir, exePath, strCommand, Arg
  3. Set fso = CreateObject("Scripting.FileSystemObject")
  4. scriptDir = fso.GetParentFolderName(WScript.ScriptFullName)
  5. exePath = scriptDir & "\scrcpy.exe"
  6. strCommand = "cmd /c cd /d """ & scriptDir & """ && """ & exePath & """"
  7. For Each Arg In WScript.Arguments
  8. strCommand = strCommand & " """ & Replace(Arg, """", """") & """"
  9. Next
  10. CreateObject("Wscript.Shell").Run strCommand, 0, False