Commit b1c80643 by 浔阳陌客

Update basicInit.bat

parent fe66cda5
......@@ -7,7 +7,7 @@ echo parameter error
goto batexit
)
echo -- S/Get Basic Info --
echo ----- S/Get Basic Info -----
set pppoename=宽带连接
for /F %%a in ('cmd /c reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" ') do (
SET b=%%a
......@@ -38,6 +38,7 @@ set deskclientfolder=%desktop%\client
set deskinitfolder=%desktop%\%proxyfile%
rem 变量呼出
echo redirect folder: %smbfolder%
echo Download Link: %downloadlink%
echo Default Proxy File: %proxyfileext%
echo Proxy Hostname: %proxyhostname%
......@@ -46,8 +47,9 @@ echo PPPOE Account: %account%
echo PPPOE Password: %password%
echo.
echo ------ PPPOE ------
echo ----- PPPOE -----
:pppoeLink
echo testing network
ping 1.2.4.8 -n 1 >nul
if %errorlevel% EQU 1 (
rasdial %pppoename% %account% %password%
......@@ -61,8 +63,13 @@ if EXIST "%desktop%\%proxyfileext%" (
goto rar
)
rem 如果重定向文件夹存在 %proxyfileext% ,否则下载
echo.
echo -- downloading %downloadlink% --
if EXIST "\\%smbfolder%\%proxyfile%\%proxyfileext%" (
echo -- copy file from \\%smbfolder%\%proxyfile%\%proxyfileext% --
copy \\%smbfolder%\%proxyfile%\%proxyfileext% %desktop% /y
) else (
echo -- downloading file from %downloadlink% --
cd %desktop%
\\%smbfolder%\%proxyfile%\download.vbs %downloadlink% %desktop%\%proxyfileext%
echo \\%smbfolder%\%proxyfile%\download.vbs %downloadlink% %proxyfileext%
......@@ -72,13 +79,14 @@ explorer %downloadlink%
echo please continue when download complete.
pause
)
)
:rar
echo.
echo ---- unrar file %proxyfileext% ----
echo ----- unrar file %proxyfileext% -----
rem 使用本地rar命令程序
echo auto raring
if EXIST "C:\Program Files\WinRAR\Rar.exe" (
echo auto raring
"C:\Program Files\WinRAR\Rar.exe" x -t -o-p %desktop%\%proxyfileext% %desktop%
rem 使用远程rar命令程序
) else (
......@@ -86,7 +94,7 @@ rem 使用远程rar命令程序
)
echo.
echo ---- ready init client ----
echo ----- init client -----
echo move client to desktop
move /Y %deskinitfolder%\client %desktop%\
......@@ -119,17 +127,20 @@ echo ERROR: start.bat is not exist
if NOT EXIST "%deskclientfolder%\run.bat" (
copy /Y \\%smbfolder%\%proxyfile%\run.bat %deskclientfolder%
)
echo.
echo ---- init will over ----
rmdir /q /s %deskinitfolder%
erase %desktop%\%proxyfileext%
echo mod adminsitrator'password to %adminpass%
net user Administrator %adminpass%
rem 关闭防火墙
sc config mpssvc start= disabled
echo.
echo ----- init will over -----
echo system will reboot at 0s later
shutdown -r -t 0
msg * everthing is ok!
exit /b 0
:batexit
exit /b 1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment