-1
我有這個腳本從我的DHCP服務器爲什麼我的IF不能正常工作?
setlocal EnableDelayedExpansion
for /f "tokens=2 delims=:" %%a in ('dhcptest-0.5-win64.exe --query --quiet ^| findstr "10.16.100.254"') do if %%a equ 10.16.100.254 (@echo DHCP Working) else (@echo Dhcp server not working!!)
C:\Users\duchoa>Dhcp server not working!
驗證IP請求,但我的變量%% a等於10.16.100.254
誰能幫助我嗎?
如果您使用該語句而不是if語句,那麼'echo %% a'的輸出是什麼? – SomethingDark