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