Hello all. I was wondering if someone could tell me the cmd command code to have the person choose to restart or not to restart. Thank you soooooooooooooo much. Lunar21
Sounds like you need that script that prompts user a yes no question SET /P ANSWER=Hey User Wanna Reboot (Y/N)? then you need some kind of if than statement Looks like Riddick got it.
@echo off SET /P ANSWER=Hey User Wanna Reboot (Y/N)?: If /I %ANSWER%==Y goto shut echo System doesn't restart pause >NUL exit :shut shutdown -r -t 5 so it's gonna work ;-)
Here is what I got: Code: @echo off :start cls set /p answer=Do you wish to install updates? (Y/N): if %answer% == Y goto install if %answer% == y goto install if %answer% == N goto exit if %answer% == n goto exit :install echo Please wait..... Windows6.1-KB123334-x86.msu /quiet /norestart Windows6.1-KB123456-x86.msu /quiet /norestart Windows6.1-KB123456-v2-x86.msu /quiet /norestart Windows6.1-KB674103-x86.msu /quiet /norestart Windows6.1-KB675605-x86.msu /quiet /norestart Windows6.1-KB675605-v2-x86.msu /quiet /norestart Windows6.1-KB675606-x86.msu /quiet /norestart Windows6.1-KB915597-x86.exe /s /norestart Windows6.1-KB958488-v6001-x86.msu /quiet /norestart Windows6.1-KB958830-x86.msu /quiet /norestart Windows6.1-KB968771-x86.msu /quiet /norestart Windows6.1-KB971012-x86.msi /quiet /norestart Windows6.1-KB972636-x86.msu /quiet /norestart Windows6.1-KB973525-x86.msu /quiet /norestart Windows6.1-KB973751-x86.msu /quiet /norestart Windows6.1-KB973874-x86.msu /quiet /norestart Windows6.1-KB974039-v2-x86.msu /quiet /norestart Windows6.1-KB974138-x86.msu /quiet /norestart Windows6.1-KB974176-x86.msu /quiet /norestart Windows6.1-KB974179-x86.msu /quiet /norestart Windows6.1-KB974204-x86.msu /quiet /norestart Windows6.1-KB974204-v2-x86.msu /quiet /norestart Windows6.1-KB974324-x86.msu /quiet /norestart Windows6.1-KB974327-x86.msu /quiet /norestart Windows6.1-KB974332-x86.msu /quiet /norestart Windows6.1-KB974638-x86.msu /quiet /norestart goto end :end cls set /p answer=Do you wish to restart? (Y/N): if %answer% == Y goto shutdown if %answer% == y goto shutdown if %answer% == N goto exit if %answer% == n goto exit :shutdown shutdown /r /f /t 5 :exit exit
I believe i have the Batch file all ready i can upload it if i find it. Edit : Nope i guess i deleted it =(
Well what I posted above works perfectly. I was able to add all of the W7 updates, but the .cab file. Is there a way to install .cab files like the one in the W7 updates?
There is: Via DISM - C:\Windows\System32\Dism.exe /Online /Add-Package /PackagePath:”C:\Windows6.1-KB974333-x86.cab” Via Pkgmgr.exe - Dont remember syntax...sorry Neither worked on this .cab tho
Well I think because inside a .cab file is supposed to me a .ini file. Well there is no .ini in this cab file.