Jump to content











Photo
- - - - -

USB Multi WIM Setup


  • Please log in to reply
1 reply to this topic

#1 far.in.out

far.in.out

    Member

  • Expert
  • 53 posts
  •  
    Ukraine

Posted 29 November 2010 - 12:22 AM

I've put together techniques from different guides and made a script that allows one to place several WIM's and XML answer files in some directories on one disk (USB, HDD, CD/DVD,...) and have them listed in script's menu after the installation media's PE boot. You can select an image and an answer file to use and start the installation.

How it works.
PE boots. If you've injected the autostart script into it - disks are scanned and when found USBMultiWIMSetup.cmd is started (if you haven't injected the autostart script you have to manually start the USBMultiWIMSetup.cmd from command prompt). It scans the disk it is on (two dirs, according to path's inside it) for WIM's and XML's. It generates lists/menus including every item it finds. All this is then output to another script which is presented to the end user.

This script currently contains 4 pages/dialogs:

1. IMAGES. Here you can see all the images found and must select one to continue.
2. ANSWER FILES. Same here, only here you select an answer file. If you don't have or don't want to use any - select "[0] - none" or skip to another page/dialog.
3. START SETUP. If you're done you can start setup from here.
0. RESTART WIZARD. This is the page where you can restart the script. It doesn't make much sense now, but I have some future plans for extension of this script, that's where it will be used.

A simple(st) example:

1. You need some files from an NT6.x installation media:
\boot folder with all it's contents
\sources folder with a boot.wim file in it, just this one file, nothing else
\bootmgr file
all this goes to the root of your boot device, whichever you are using. From now on it will be referred to as [boot disk].

1a. This step is required to have the script loaded automatically on PE boot. You have to inject the StartSetup.cmd and winpeshl.ini files from downloaded archive to boot.wim's second image. The path is:
Windows\System32\

2. You can now put your WIM's and XML's to some folders on some disk. From now on that disk will be referred to as [source disk]. Next thing to do is to edit the USBMultiWIMSetup.cmd and enter the path's to WIM's and XML's you are using at the top of the file. In this example we are using:

\IMG for WIM's and
\XML for XML's
so it looks like this in the .cmd:
set wimpth=IMG

set xmlpth=XML

3. You need to put the modified USBMultiWIMSetup.cmd file to the root of your [source disk].

Now, the [boot disk] and the [source disk] can be two different devices/disks or it can be one disk. In this example it is one disk. So the next picture shows the end file/folder structure one should get after peforming all the above steps. It also shows what files/folders should go to the [boot disk] / [source disk] if they were two different disks (according to the color).

Posted Image

The run.cmd file included in download is the end user generated script for our example.
The following pictures show what it looks like.

Posted ImagePosted Image

Posted ImagePosted Image


I've tested it on USB and HDD so far.
My tests show that it is better to use same architecture PE for your image, that is - if you're installing x64 image use x64 PE and an x86 one for x86 image. Otherwise answer file may not work correctly. So you should probably have records for at least two of PE's in your BCD store.

Download: USBMultiWIMSetup v0.9 RC.zip

#2 far.in.out

far.in.out

    Member

  • Expert
  • 53 posts
  •  
    Ukraine

Posted 08 December 2010 - 01:06 PM

One limitation to this version to note: you can't use path's with spaces.
Example:
this works
X:\sources\setup.exe /installfrom:H:\IMG\WIM\ENTx64.wim /unattend:%answ_path%
and this doesn't work.
X:\sources\setup.exe /installfrom:H:\MY IMG\WIM\ENT x64.wim /unattend:%answ_path%
Quotes seem to break the command line as well.

Also - how come I can't edit the first post?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users