
批處理ifelse嵌套腳本報(bào)錯(cuò)運(yùn)行一直報(bào)錯(cuò):The syntax of the command is incorrect.哪位可以幫忙看看,謝謝!------------------------------------------------------------------------------------
nclick="copycode($('code0'));">復(fù)制代碼
- @echo off
- @hostname>>c:temphostname.txt
- set /p host=<c:temphostname.txt
- if %host:~7,5% lss 10031 (echo %user% is Com_PRD_PPC01)
- else if %host:~7,5% lss 10061 (echo %user% is Com_PRD_PPC02)
- else if %host:~7,5% lss 10091 (echo %user% is Com_PRD_PPC03)
- else if %host:~7,5% lss 10121 (echo %user% is Com_PRD_PPC04)
- else if %host:~7,5% lss 10151 (echo %user% is Com_PRD_PPC05)
- else if %host:~7,5% lss 10181 (echo %user% is Com_PRD_PPC06)
- else if %host:~7,5% lss 10211 (echo %user% is Com_PRD_PPC07)
- else if %host:~7,5% lss 10241 (echo %user% is Com_PRD_PPC08)
- else if %host:~7,5% lss 10271 (echo %user% is Com_PRD_PPC09)
- else if %host:~7,5% lss 10301 (echo %user% is Com_PRD_PPC10)
- else if %host:~7,5% lss 10331 (echo %user% is Com_PRD_PPC11)
- else if %host:~7,5% lss 10361 (echo %user% is Com_PRD_PPC12)
- else if %host:~7,5% lss 10391 (echo %user% is Com_PRD_PPC13)
- else if %host:~7,5% lss 10421 (echo %user% is Com_PRD_PPC14)
- else if %host:~7,5% lss 10451 (echo %user% is Com_PRD_PPC15)
- else if %host:~7,5% lss 10481 (echo %user% is Com_PRD_PPC16)
- else if %host:~7,5% lss 10511 (echo %user% is Com_PRD_PPC17)
- else if %host:~7,5% lss 10541 (echo %user% is Com_PRD_PPC18)
- else if %host:~7,5% lss 10571 (echo %user% is Com_PRD_PPC19)
- else if %host:~7,5% lss 10601 (echo %user% is Com_PRD_PPC20)
- else if %host:~7,5% lss 10631 (echo %user% is Com_PRD_PPC21)
- else if %host:~7,5% lss 10661 (echo %user% is Com_PRD_PPC22)
- else if %host:~7,5% lss 10691 (echo %user% is Com_PRD_PPC23)
- else if %host:~7,5% lss 10721 (echo %user% is Com_PRD_PPC24)
- else if %host:~7,5% lss 10751 (echo %user% is Com_PRD_PPC25)
- else if %host:~7,5% lss 10781 (echo %user% is Com_PRD_PPC26)
- else (goto eof)
- copy c:scriptTimeshortcut.lnk C:Users%user%Desktopshortcut.lnk
- pause&exit

