我们运行2个批处理文件来交换用于以太网连接的IP地址,并在桌面上复制一个图标,以便用户可以看到它们所处的“模式”。这是一个小问题。他们在桌面上创建一个空图标(有时是空白页图标,有时是文件夹图标)。我猜它是NULL。
是否可以删除批处理文件中的图标?
第一批:
@echo off
Net Session >Null 2>&1 || GoTo RunAdmin
del %userprofile%\desktop\TestingMode.ico
copy "c:\ded files\ReplicationMode.ico" %userprofile%\desktop
:: Configuration Variables ::
set connectionName="Ethernet 3"
netsh interface ip set address %connectionName% dhcp
netsh interface ip set dns %connectionName% dhcp
ie4uinit.exe -show
cls
echo YOU'RE NOW CONFIGURED FOR REPLICATION SERVICES.
TIMEOUT 5
EXIT
:RunAdmin
cls
echo.
echo. Please close this window and RIGHT Click and Choose 'Run as Administrator'
echo.
timeout /t -1
GOTO Stop
第二批:
@echo off
Net Session >Null 2>&1 || GoTo RunAdmin
del %userprofile%\desktop\ReplicationMode.ico
copy "c:\DED files\TestingMode.ico" %userprofile%\desktop
:: Configuration Variables ::
set connectionName="Ethernet 3"
set staticIP=192.168.1.50
set subnetMask=255.255.255.0
set defaultGateway=192.168.1.1
netsh interface ip set address %connectionName% static %staticIP% %subnetMask% %defaultGateway% 1
ie4uinit.exe -show
cls
echo YOU'RE NOW CONFIGURED FOR TESTING SERVICES.
TIMEOUT 5
EXIT