w10install/ToolsDownload.cmd

56 lines
1.2 KiB
Batchfile
Raw Normal View History

2020-12-22 16:07:56 +01:00
@echo off
2021-01-10 00:22:42 +01:00
set LOG=c:\ToolsDownload.txt
set SETUPDIR=c:\Windows\Setup\scripts
set FTPSCRIPT=ToolsDownload.ftp
2020-12-23 16:44:26 +01:00
set T=c:\TEMP
set TOOLS=c:\tools
set SCRIPTS=c:\scripts
2021-01-10 00:22:42 +01:00
del /Q %LOG% 1>nul 2>nul
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
shift /1
2020-12-22 21:10:54 +01:00
2020-12-23 16:46:24 +01:00
echo ####### %0 #######
2021-01-10 00:22:42 +01:00
date /t
time /t
echo.
2020-12-22 16:07:56 +01:00
echo killing some processes...
taskkill /F /IM ssh-agent.exe
taskkill /F /IM ssh.exe
echo restart explorer ...
taskkill /F /IM explorer.exe & start explorer.exe
echo deleting %TOOLS% and %SCRIPTS% ...
rd /S /Q %TOOLS%
rd /S /Q %SCRIPTS%
echo creating directories ...
mkdir %T% 1>nul 2>nul
mkdir %TOOLS% 1>nul 2>nul
mkdir %SCRIPTS% 1>nul 2>nul
mkdir %SCRIPTS%\conf 1>nul 2>nul
mkdir %SCRIPTS%\desktop 1>nul 2>nul
mkdir %SCRIPTS%\tweaks 1>nul 2>nul
2020-12-24 14:38:22 +01:00
mkdir %SCRIPTS%\other 1>nul 2>nul
2020-12-22 16:07:56 +01:00
2020-12-30 19:59:33 +01:00
echo DISABLE firewall (for FTP access) ...
2020-12-25 22:24:09 +01:00
netsh advfirewall set allprofiles state off
2020-12-22 16:07:56 +01:00
echo getting TOOLS from webserver ...
2021-01-10 00:22:42 +01:00
cd /D %SETUPDIR%
if EXIST %FTPSCRIPT% (
echo EXECUTING ftp script %FTPSCRIPT% in path %SETUPDIR% ...
ftp -i -s:%FTPSCRIPT%
) else (
echo INFO: %FTPSCRIPT% not found in path %SETUPDIR% !
2020-12-30 19:59:33 +01:00
)
2020-12-22 16:07:56 +01:00
2021-01-10 00:22:42 +01:00
echo.
date /t
time /t
2020-12-23 16:46:24 +01:00
echo ####### %0 #######
2020-12-22 16:07:56 +01:00