Created
May 3, 2020 08:47
-
-
Save liyafe1997/2be0e28696de889af3546ebf1ce1523a to your computer and use it in GitHub Desktop.
For move Desktop to a iSCSI drive and detect at startup(some time iSCSI load slower than explorer.exe)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
title 请不要关闭本窗口 | |
cls | |
echo 正在连接iSCSI...... | |
echo 如果长时间连接不上,请检查网络 | |
if not exist D:\Desktop ( | |
goto aaa | |
) else ( | |
exit | |
) | |
:aaa | |
taskkill /im explorer.exe /f >NUL 2>NUL | |
:bbb | |
if not exist D:\Desktop ( | |
taskkill /im explorer.exe /f >NUL 2>NUL | |
ping 127.0.0.1 -n 2 >NUL 2>NUL | |
goto bbb | |
) else ( | |
explorer.exe | |
powershell -file startautorun.ps1 | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment