I'm creating A Small Program To Help With The Infamous Windows Update Fail in Windows 7! What I'm Using Is A Batch But For Some Reason The "echo." isn't showing blank lines. Any Ideas. Here's my code below
@echo off
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking Administration Privledges
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::
setlocal & pushd .
REM Run shell as admin (example) -
SET ProgFiles86Root=%ProgramFiles(x86)%
IF NOT "%ProgFiles86Root%"=="" GOTO win64
SET ProgFiles86Root=%ProgramFiles%
:win64
CLS
::: _ _ _ _ _ _ _
::: | | | |(_) | | | | | | | |
::: | | | |_ _ __ | | | |_ __ __| | __ _| |_ ___
::: | |/\| | | '_ \| | | | '_ \ / _` |/ _` | __/ _ \
::: \ /\ / | | | | |_| | |_) | (_| | (_| | || __/
::: \/ \/|_|_| |_|\___/| .__/ \__,_|\__,_|\__\___|
::: ======================| |==============FIXER v1.0===============
::: |_|
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A
timeout /t 10 >nul
cls
IF EXIST %systemdrive%\winuf.dll (goto second) else goto begin
:begin
echo Thanks For Choosing To Run WinUpdate Fixer
echo.
echo.
echo This Program Will Attempt To Fix Your Windows Update Issues!
echo By Continuing WinUpdate Fixer Will Reset Your Windows Update
:choice
set /P c=Do you want to continue[Y/N]?
if /I "%c%" EQU "Y" goto :fix
if /I "%c%" EQU "N" goto :exit
goto :choice
:exit
echo.
echo.
echo Thanks Anyway!
pause
exit
:fix
REM. > %systemdrive%\winuf.dll
echo.
echo.
echo.
echo *******************************************************************************
echo Fixing Windows Update
echo *******************************************************************************
pause
:second
del /q /s /f %systemdrive%\winuf.dll >nul
echo did the program work
pause