Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

turn windows update on/off

- - - - -

Best Answer FreeBooter , 07 January 2019 - 06:56 AM

Create a batch file with below commands, file must have .bat [email protected] Off & ClsREM --> Check for permissionsReg query "HKU\S-1-5-19\Environment" > NulREM --> If error flag s... Go to the full post »


  • Please log in to reply

#1
racenutalways

racenutalways

    Member 1K

  • Retired Staff
  • 1,670 posts

I need to turn off windows update during gameplay, I manually do it through services.msc

 

I would like a script or batch file or whatever it is, to do it at a single click

do we save sc config wuauserv start= disabled " to a text file?? Save it as?? 

and another for "net start wuauserv" ???

 

better way of doing it??


  • 0

Advertisements


#2
FreeBooter

FreeBooter

    Member 1K

  • Member
  • PipPipPipPip
  • 1,460 posts
✓  Best Answer

Create a batch file with below commands, file must have .bat extension.

@Echo Off & Cls



REM  --> Check for permissions
Reg query "HKU\S-1-5-19\Environment" > Nul
REM --> If error flag set, we do not have admin.
if %errorlevel% NEQ 0 (
ECHO                 **************************************
ECHO                  Running Admin shell... Please wait...
ECHO                 **************************************

    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = "%*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B
cls

:gotAdmin


Choice /C YS /N /M "Start Windows Update, press (Y) ;  Stop Windows Update, press (S) 
if %Errorlevel% EQU 1 Goto :_Start
if %Errorlevel% EQU 2 Goto :_Stop

:_Start
Sc config wuauserv start= auto > Nul
Sc start wuauserv > Nul




Exit
:_Stop

Sc config wuauserv start= disabled > Nul
Sc stop wuauserv > Nul

Double click batch file to start or disable Windows update.


  • 0

#3
racenutalways

racenutalways

    Member 1K

  • Topic Starter
  • Retired Staff
  • 1,670 posts

thank you so very much......... :yeah:

 

 

 

 


  • 0

#4
FreeBooter

FreeBooter

    Member 1K

  • Member
  • PipPipPipPip
  • 1,460 posts

You are very welcome!


  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP