Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

Recommended Posts

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).

tree.png

The run.cmd file included in download is the end user generated script for our example.

The following pictures show what it looks like.

m1.pngm2.png

m3.pngm4.png

Known issues:

Current version doesn't allow to use spaces inside commandline's arguments.

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.

This needs further testing.

Edited by POMAH-PRESS
Link to post
Share on other sites

  • 2 weeks later...

Well, I don't see why it shouldn't. I don't have any Vista's to test though.

I happen to have vista sp2 and windows 7. If no one else is faster I can try later:)

Just place all wims in wimfiles in wim but boot? From 7 then i guess hehe.

Link to post
Share on other sites
I happen to have vista sp2 and windows 7. If no one else is faster I can try later:)

That would be great and appreciated.

Just place all wims in wimfiles in wim but boot? From 7 then i guess hehe.

Didn't get that.

Edited by POMAH-PRESS
Link to post
Share on other sites
I happen to have vista sp2 and windows 7. If no one else is faster I can try later:)

That would be great and appreciated.

Just place all wims in wimfiles in wim but boot? From 7 then i guess hehe.

Didn't get that.

Place all *wim in images.. But Im whondering a little thing with vista.. If i make an 7+vista AIO (in same *.wim) the first part of setup will complete fine but after restart it will fail.. Im whondering if same thing will happen here..

Link to post
Share on other sites

Well i tried exporting first win7 to a new install.wim and then vista using windows 7 waik and i can tell its not working.

New *.wim was moved to windows 7 dvd..

Edited by grabben
Link to post
Share on other sites

Oh waiit, duh! So in the end, you are attempting to install the Vista WIM using the Windows 7 setup.exe? That could be the problem. You may need to script it to use the Vista setup.exe, call it setup2.exe or something and you could put it in the same place as the Win7 setup.exe. You can try run depends on both to see if the older setup needs different files if that still doesn't work.

Link to post
Share on other sites

Oh waiit, duh! So in the end, you are attempting to install the Vista WIM using the Windows 7 setup.exe? That could be the problem. You may need to script it to use the Vista setup.exe, call it setup2.exe or something and you could put it in the same place as the Win7 setup.exe. You can try run depends on both to see if the older setup needs different files if that still doesn't work.

Yea i figured it mustve been something with setup.exe.. Yea I am, atleast i tried once hehe..

How can I do that? Not that I need vista today but would be interesting to know:)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...