Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Update your Win 7 installation media.

3 Hours Ago   #281
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote:
Does your :All script deal with images with less or more than 4 images to update when all (*) is selected?
Yes.

BY default it only looks for a maximum of 5 images.

Code:
for /l %%a in (1,1,5) do set idx_%%a=& set nred_%%a=& set ned_%%a=
It doesn't matter if there are less than 5, it will list them, and you can select a single or ALL.

If single image is selected than only that selected image is updated.


If ALL is selected then only image 1 is updated. It is then exported n times into a temporary $install.wim.

The xml file from the original install.wim is read to get the correct description and name for each image.

Images 2, 3, 4, 5 ( if there are that many) from $install.wim are mounted one at a time and the edition is changed to the next higher - found by reading the xml file from the original install.wim.

When done, install.wim is deleted, then $install.wim is renamed to install.wim


[ Note:if selecting ALL IMAGES

i) it doesn't work if you have mixed x64 and x86 images into the same wim.
ii) consumer editions can only have editions changed up to Ultimate - not Enterprise.
So there is no reason to have more than 5 images

]


My System SpecsSystem Spec
.
2 Hours Ago   #282
Megahertz07

Windows 7 HP 64
 
 

Ok, understood.

But how to avoid the user to select a image not listed?

For example:
Install.wim has only two images - 1 and 2
or
Install.wim has 5

But the choi check
(IF /I NOT '%CHOI%'=='1' IF /I NOT '%CHOI%'=='2' IF /I NOT '%CHOI%'=='3' IF /I NOT '%CHOI%'=='4' IF /I NOT '%CHOI%'=='*' goto :Chooseimage)
- Doesn't accept 5
- If Install.wim has only two images - 1 and 2 it will accept numbers 3 or 4.

How to correct this?
My System SpecsSystem Spec
2 Hours Ago   #283
Megahertz07

Windows 7 HP 64
 
 

To test may script I choose Simplix to update HomePremium (2) but the UpdatePack7R2-19.4.10 log says that Home Basic and Windows 7 Home Premium has been updated (same Integration files).
Why?
My System SpecsSystem Spec
.

1 Hour Ago   #284
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote:
- If Install.wim has only two images - 1 and 2 it will accept numbers 3 or 4.
Mine doesn't. If you select 1 or 2 it proceeds.

If you press any other key, it askes again, please enter an image numer to process.

See this pic - there are only 2 images.

First time I entered 3 - so it asks again.

Second time I entered 5 - so it asks again.

It will keep asking until you enter 1 or 2.


Update your Win 7 installation media.-image-selection.jpg


My System SpecsSystem Spec
1 Hour Ago   #285
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote:
To test may script I choose Simplix to update HomePremium (2) but the UpdatePack7R2-19.4.10 log says that Home Basic and Windows 7 Home Premium has been updated (same Integration files).
Why?
I don't know - maybe they have already been updated when you tested earlier? Try with a fresh install.wim

Otherwise, you will have to ask Simplix.
My System SpecsSystem Spec
1 Hour Ago   #286
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote:
But the choi check
(IF /I NOT '%CHOI%'=='1' IF /I NOT '%CHOI%'=='2' IF /I NOT '%CHOI%'=='3' IF /I NOT '%CHOI%'=='4' IF /I NOT '%CHOI%'=='*' goto :Chooseimage)
- Doesn't accept 5
- If Install.wim has only two images - 1 and 2 it will accept numbers 3 or 4.

How to correct this?

Better to increment the number (n) according to how many images there are in the wim, like this:

Code:
set n=
for /l %%a in (1,1,5) do set idx_%%a=& set nred_%%a=& set ned_%%a=
for /f "tokens=2 delims=: " %%i in ('%wimlib% info "%wimdir%\sources\boot.wim"^| find /i "Architecture"') do set wimarch=%%i
If %wimarch% equ x86_64 SET wimarch=x64
echo.
FOR /F "tokens=1-2 Delims=:" %%A IN ('%wimlib% info "%wimdir%\sources\boot.wim" ^| FINDSTR "^Index: ^Name: ^Architecture: ^Edition ^Languages:"') DO (
if /i "%%A"=="index" set /a n+=1& set /a idx_!n!=%%B
if /i "%%A"=="name" set nr=%%B& set nred_!n!=!nr:~19!
if /i "%%A"=="Edition ID" set ed=%%B& set ned_!n!=!ed:~13!
if /i not "%%B"=="           x86_64" (echo %%A: %%B) else (echo %%A:            x64)
if /i "%%A"=="Languages" echo.
)
echo.
echo n  ( number of images) is now %n%
Then when selecting only a number between 1 and n will be accepted


Code:
:CHOOSEIMAGE
echo.
echo.
echo.
echo  PLEASE ENTER AN IMAGE NUMBER TO PROCESS
echo.  
echo  OR ENTER * TO PROCESS ALL IMAGES
echo.
echo.
set CHOI=
set /p CHOI="Image Number / * for ALL => "
ECHO.
if not defined CHOI (echo         Please enter * to update ALL or select Image number*& echo.&>nul TIMEOUT /T 3& goto :CHOOSEIMAGE)
if "%CHOI%"=="*" echo          ALL EDITIONS WILL BE UPDATED&SET INDNO=1& GOTO :ALLIMAGES
for /l %%a in (1,1,%n%) do if "%choi%"=="%%a" (SET INDNO=%CHOI%& GOTO :SINGLEIMAGE)
GOTO :CHOOSEIMAGE
So if you enter * it goes to :ALLIMAGES

If you enter anything between 1 and %N% it goes to :SINGLEIMAGE

If you enter anything else, it goes back to :CHOOSEIMAGE
My System SpecsSystem Spec
1 Hour Ago   #287
Megahertz07

Windows 7 HP 64
 
 

OK, going back to work on my script.

I did on a fresh install.wim from a MS iso.

Thank you so much for your patience.
My System SpecsSystem Spec
1 Hour Ago   #288
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

In my next version, I will probably echo a message if the user hits the wrong key.

Code:
if not defined CHOI (echo         Please enter * to update ALL or select Image number& echo.&>nul TIMEOUT /T 3& goto :CHOOSEIMAGE)
if "%CHOI%"=="*" echo          ALL EDITIONS WILL BE UPDATED&SET INDNO=1& GOTO :ALLIMAGES
for /l %%a in (1,1,%n%) do if "%choi%"=="%%a" (SET INDNO=%CHOI%& GOTO :SINGLEIMAGE)
GOTO :CHOOSEIMAGE
Instead of GOTO :CHOOSEIMAGE

I could put

ECHO.& ECHO PLEASE ENTER A NUMBER BETWEEN 1 AND %n% OR * FOR ALL IMAGES& GOTO :CHOOSEIMAGE



So if I enter anything not * or between 1 and %n%, it echoes that message and goes back to :CHOOSEIMAGE

Update your Win 7 installation media.-wrong-input-message.jpg


My System SpecsSystem Spec
39 Minutes Ago   #289
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote   Quote: Originally Posted by Megahertz07 View Post
If not using UpdatePack7R2*.exe I run :Single or :All images updates that call :MountInstallWim
that install the stuff in the Drivers / Update folders - and also copy in the new winre.wim, if there is one.
Correct.
My System SpecsSystem Spec
Reply

 Update your Win 7 installation media.




Thread Tools




Similar help and support threads
Thread Forum
TEST -Update 7 installation media
Anyone who wants to give this a try: 1. Put your win7 dvd in the drive, rt click it and select COPY. Then rt click your partition (e.g. C ) and PASTE. It will take a few mins and you should have afolder on c containing the installation files, like this: 2. Install WUD - tiny program:
Installation & Setup
Windows Media Player will not update media library
I am a music downloader. It used to be that WMP12 would update the mp3 music folders to where the folder contents would read as follows: 01 'Track Name' 02 'Track Name' 03 'Track Name' and so on... This is no longer the case. WMP will not update my media library files, although it...
General Discussion
How to get installation media?
Hi, I've got an HP Pavilion laptop that came with Windows 7 installed as a Vista upgrade. I'd like to blow it away, repartition the disk for dual boot with Linux, and do a clean install of Windows 7. The only problem (I think) is that I don't have the installation media. I've searched online...
Installation & Setup
Bad installation media I think
Remember me? I'm the one with the pirated W7 Ultimate. I finally bought a genuine W7 Ultimate disk from Newegg for the tune of $310. Still working with MasterCard to get my money back. It looks favorable. When I went to do a clean install the auto-boot worked but it hung up with a blue screen...
Installation & Setup
media smart server update corrupted media center
I have 4 computers all running windows 7-3 in 32 and 1 in 64. All were working fine and no issues with my mediasmart 470 server. I only have one computer with console running. The other day pp3 came out and has made a mess of my computer that has connector to server. It seems to have corrupted...
Media Center


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:16.
Twitter Facebook