:: By: Jack | Release 05/08/2017 | make_WinLatest_FTL.bat | https://pastebin.com/YyUDP18H | [x] Line 228 - Fixed Logic phale. :: Author HAS NEVER RUN IT, Code is UNTESTED :: Do not read or even run this script/file, if you're easily offended :: USE AT YOUR [b]OWN[/b] RISK!!!!!11111ONEONEOne :: - if you do not know what the script/file commands do, DO NOT RUN SCRIPT/FILE :: -- This Script CAN/WILL brick (brake) your OS :: @echo off :: timeout value before main events set "_wait_time=5" set "_http_addr=https://www.microsoft.com/en-ca/software-download/windows10" ::::::::::::::::::::::::::::::::::::::: :: :: :: [Mis]-Information :: :: :: ::::::::::::::::::::::::::::::::::::::: ( echo/ echo/ Note: Script Author: JaCk found this note in a text file in his archive, then proceeded to create %~n0 echo/ Note: Note below is restyled from the orginial, restyling by JaCk. echo/ Note: Note below is slightly reworded from the orginial, rewording by JaCk. echo/ echo/ Note: Original Author/Source of the note below is UNKNOWN echo/ echo/ echo/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo/ echo/ Example, ISO file from Windows 10 version 1511 will not work in a system running Windows 10 version 1607, and vice versa. echo/ echo/ If you need a Win 10 version 1607 ISO file, use this Media Creation Tool echo/ https://www.microsoft.com/en-ca/software-download/windows10 echo/ echo/ - Click the "Download Tool now" button and Run it. echo/ -- Then select Create installation media for another PC echo/ -- That will begin downloading the ISO file to your computer. echo/ echo/ When download is completed, RIGHT click at the ISO ^> click Mount ^> and leave it there. echo/ - Then open the elevated command prompt and copy and paste this................ echo/ echo/ Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:H:\sources\install.esd:1 /limitaccess echo/ echo/ - Note :H is the drive where the iso is mounted. Change it if your driver letter is different. echo/ echo/ - When it is completed, you should get the report that the operation is successful. echo/ echo/ Now run the sfc /scannow command again. It should be ok this time. echo/ echo/ sfc /scannow echo/ echo/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo/ ) ::::::::::::::::::::::::::::::::::::::: :: :: ::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::: :: :: :: Status Check :: :: Decision Block :: :: :: ::::::::::::::::::::::::::::::::::::::: :: Set Default and Prompting user input echo/ INPUT: Open Browser and go to "%_http_addr%" [y/N] set "_input_user=N" set /p "_input_user=" :: go to the url.... If that's what you're into if /i not "%_input_user:~0,1%" equ "N" ( start %_http_addr:"=% ) :: Admin Check set "_console_elevated=" "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 2>nul 1>nul && set /a "_console_elevated+=1" :: If batch file is already elevated (admin) then change phrasing of the prompting if defined _console_elevated ( echo/ INPUT: Run Commands now? [Y/n] ) else ( echo/ INPUT: Elevate (get admin) and run commands now? [Y/n] ) :: Set Default and Prompting user input set "_input_user=Y" set /p "_input_user=" :::: Sorry, It's not me, It's you :::: :::: "I gotta blame somebody. Otherwise it's all my fault... F_ck that." - Chloe Price [Game - Life is Strange - Dontnod Entertainment - 2015 - Ep 3] :::: :: :: exit script/function if answer is not y including [yes/YES/yep/yikes/yellow/YOLO] :: if /i not "%_input_user:~0,1%" equ "Y" ( goto :eof exit /b 0 ) :: attempting to stop the stupid, not enough time to scrub code for the full ritard (yes, ritard) if defined _wait_time ( if not %_wait_time:~-5% leq 9999 set /a "_wait_time=9999" ) ::::::::::::::::::::::::::::::::::::::: :: :: ::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::: :: :: :: Admin me plox :: :: :: ::::::::::::::::::::::::::::::::::::::: :: if needed, Create Script for ascension if not defined _console_elevated ( echo Set Admin = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo Admin.ShellExecute WScript.Arguments^(0^), "", "", "runas", 1 >> "%temp%\getadmin.vbs" ) :: Ascend or Descend [I see you're building a nest] :: if defined _console_elevated ( echo INFO: Admin Elevated Console [x] ) else ( echo INFO: Admin Elevated Console [ ] if exist "%temp%\getadmin.vbs" ( echo INFO: Starting Script in Admin Mode. call cscript "%temp%\getadmin.vbs" "%~s0" || ( echo/FATAL: ERROR: Unknown echo/FATAL: ERROR: Please restart with admin privledges... if defined _wait_time timeout /t %_wait_time% goto :eof 255 exit /b 255 ) ) else ( echo/FATAL: ERROR: Unable to find my created elevated catalyst ["%temp%\getadmin.vbs"] echo/FATAL: ERROR: Please restart with admin privledges... if defined _wait_time timeout /t %_wait_time% goto :eof 1 exit /b 1 ) if defined _wait_time timeout /t %_wait_time% goto :eof exit /b 0 ) ::::::::::::::::::::::::::::::::::::::: :: :: ::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::: :: :: :: Var Count Bratchula :: :: Give me your Blood.. or Input :: :: :: ::::::::::::::::::::::::::::::::::::::: echo/ INPUT: Enter the [dism] command below or just the location of the esd file in question echo/ example #1: Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:H:\sources\install.esd:1 /limitaccess echo/ example #2: H:\sources\install.esd:1 echo/ example #3: H:\sources\install.esd echo/ echo/ Note: as in example #3, script assumes partition :1 unless provided in the path/command (see example #2 above) echo/ set "_command_dism=" set /p "_command_dism=" echo/ echo/ echo/ INPUT: Enter the [sfc] command or any additions to the default [sfc /scannow] set "_command_sfc=sfc /scannow" set /p "_command_sfc=" echo/ echo/ if not defined _command_dism ( rem PEACE, I'm OUT, goodbye cruel, cruel console user echo/FATAL: ERROR: dism Command Undefined goto :eof 1 exit /b 1 ) :: if it's an addition to the command, append it (checks the first 5 characters) echo "%_command_dism~0,5%" | findstr /i "dism" 2>nul 1>nul if %errorlevel% neq 0 ( if exist "%_command_dism%" ( set "_command_dism=Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:%_command_dism%:1 /limitaccess" ) else ( rem Check for partition symbol, if found, assume to make an ass of of u and me echo %_command_dism:*:=:% | findstr ":" 2>nul 1>nul && ( set "_command_dism=Dism /Online /Cleanup-Image /RestoreHealth /Source:esd:%_command_dism% /limitaccess" ) rem OH NOES, He's Dead Jim. echo %_command_dism:*:=:% | findstr ":" 2>nul 1>nul || ( echo/ERROR: Script is Unable to locate ESD image echo/ Proceeding with input anyway ) ) ) else ( rem dism found in command line, proceeding to assume to make an ass of of u and me rem do nothing, eat nothing, sleep... nothing. Because nothing is not something. There is no spoon. ) :: if it's an addition to the command, append it (checks the first 15 characters) echo "%_command_sfc~0,15%" | findstr /v /i "sfc" 2>nul 1>nul && set "_command_sfc=sfc /scannow %_command_sfc%" ::::::::::::::::::::::::::::::::::::::: :: :: ::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::: :: :: :: Running Commands :: :: :: ::::::::::::::::::::::::::::::::::::::: :: Run Commands echo INFO: Command: dism: [%_command_dism%] echo/ echo INFO: Command: sfc: [%_command_sfc%] echo/ if defined _wait_time timeout /t %_wait_time% call %_command_dism% call %_command_sfc% ::::::::::::::::::::::::::::::::::::::: :: GTFO :: :::::::::::::::::::::::::::::::::::::::