Sample VBScript (a particular executable cliparserPause.exe is used to mimic VLC behaviour):option explicitOn Error GoTo 0Dim strResult: strResult = Wscript.ScriptNameDim sCmdToRun, WshShell, intReturn' CMD /C ""D:\bat\Prog Files (x86)\cliparserPause.exe" -vvv "http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO==" :sout=#file{dst="F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4",no-overwrite} :sout-keep"sCmdToRun = "CMD /C """"D:\bat\Prog Files (x86)\cliparserPause.exe"" -vvv ""http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO=="" :sout=#file{dst=""F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4"",no-overwrite} :sout-keep"""strResult = strResult & vbNewLine & sCmdToRunSet WshShell = WScript.CreateObject("WScript.Shell")intReturn = WshShell.Run( sCmdToRun, 1, true)strResult = strResult & vbNewLine & Cstr( intReturn )Wscript.Echo strResultWscript.Quit( intReturn )输出:==> CMD /C ""D:\bat\Prog Files (x86)\cliparserPause.exe" -vvv "http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO==" :sout=#file{dst="F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4",no-overwrite} :sout-keep"param 0 = D:\bat\Prog Files (x86)\cliparserPause.exeparam 1 = -vvvparam 2 = http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO==param 3 = :sout=#file{dst=F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4,no-overwrite}param 4 = :sout-keeppress any key to continue...==> echo %errorlevel%-1004==> cscript //NOLOGO D:\VB_scripts\SO\43649265.vbs43649265.vbsCMD /C ""D:\bat\Prog Files (x86)\cliparserPause.exe" -vvv "http://www.foo.com:8085/video.mp4/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9NC8yNy8yMDE3IDEyO==" :sout=#file{dst="F:\\Partition C Backup\\Downloads\\Video\\TESTING.mp4",no-overwrite} :sout-keep"-1004==> echo %errorlevel%-1004cliparserPause.exe 来源:#include "stdafx.h"#include <wchar.h>#include <cstdio>#include <stdlib.h>int main(int argc, wchar_t* argv[]){ for (int i = 0; i < argc; ++i) { wprintf(L"param %d = %S\n", i, argv[i]); } wprintf(L"press any key to continue..."); std::getchar(); exit(-999 - argc); /* exitcode to OS = ( -1000 -supplied_paramaters_count ) */ return 0;} 这篇关于运行空格过多的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-19 09:00