
批處理start命令無法運(yùn)行不知道是哪里寫錯了,目錄下是存在file.exe photo.exe 和psd.exe的而且這三個是安裝包里面都包含了1-9 a-k的所有程序?yàn)榱颂^管理員所以靜默解壓到%temp%目錄下,但就是運(yùn)行不了一直下載,有大神知道哪里出錯了嗎,語法什么的都沒錯啊
nclick="copycode($('code0'));">復(fù)制代碼
- @echo off&Setlocal enabledelayedexpansion&mode con cols=90 lines=30
- set command=%windir%command
- if not exist %command% md %command%
- cd /d %command%||call:usa
- :::::::::::::::::::::::::::::::::::EXE:::::::::::::::::::::::::::::::::::
- if not exist 1.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 2.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 3.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 4.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 5.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 6.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 7.exe (start /wait file.exe||Set url=a&call:down)
- if not exist 8.exe (start /wait file.exe||Set url=a&call:down)
- :::::::::::::::::::::::::::::::::::BMP:::::::::::::::::::::::::::::::::::
- if not exist a.bmp (start /wait photo.exe||Set url=b&call:down)
- if not exist b.bmp (start /wait photo.exe||Set url=b&call:down)
- if not exist c.bmp (start /wait photo.exe||Set url=b&call:down)
- if not exist d.bmp (start /wait photo.exe||Set url=b&call:down)
- if not exist e.ico (start /wait photo.exe||Set url=b&call:down)
- :::::::::::::::::::::::::::::::::::PSD:::::::::::::::::::::::::::::::::::
- if not exist f.psd (start /wait psd.exe||Set url=c&call:down)
- if not exist i.psd (start /wait psd.exe||Set url=c&call:down)
- if not exist j.psd (start /wait psd.exe||Set url=c&call:down)
- if not exist k.psd (start /wait psd.exe||Set url=c&call:down)
- echo ok&pause
- 。。。。。
- :Test
- set g=0.0.0.0 & set j=
- for /f tokens=3 %%a in ('route print^|findstr 0.0.0.0.*0.0.0.0') do (
- if not defined j for %%b in (%%a) do set g=%%b & set j=1)
- ping.exe %g% -n 1
- if %errorlevel%==0 (goto:eof) else (echo 網(wǎng)絡(luò)鏈接不正常。&pause&exit)
- :down
- if %url%==a set down=http://1.exe file.exe
- if %url%==b set down=http://2.exe photo.exe
- if %url%==c set down=http://3.exe Psd.exe
- call:Test
- (echo on error resume next
- echo Download Wscript.Arguments^(0^),Wscript.Arguments^(1^)
- echo Sub Download^(url,target^)
- echo Const adTypeBinary = 1
- echo Const adSaveCreateOverWrite = 2
- echo Dim http,ado
- echo Set http = CreateObject^(Msxml2.ServerXMLHTTP^)
- echo http.open GET,url,False
- echo http.send
- echo Set ado = createobject^(Adodb.Stream^)
- echo ado.Type = adTypeBinary
- echo ado.Open
- echo ado.Write http.responseBody
- echo ado.SaveToFile target
- echo ado.Close
- echo End Sub)>DownloadFile.vbs||call:usa
- echo 正在下載必要組件。
- call DownloadFile.vbs %down%
- if %url%==a start /wait file.exe&echo y|copy %Temp%~command %command%&goto:eof
- if %url%==b start /wait photo.exe&echo y|copy %Temp%~command %command%&goto:eof
- if %url%==c start /wait psd.exe&echo y|copy %Temp%~command %command%&goto:eof
- del DownloadFile.vbs
- set down=&set url=&goto:eof

