MSFN Forum: Windows Recovery Environment from DVD - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Windows Recovery Environment from DVD Rate Topic: -----

#1 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 30 November 2009 - 08:15 AM

Hi all,

What I want to achieve:-

When I sell a new PC with Windows 7, I want to create a self booting System Recovery DVD.
I am fully aware that you can create a WinRE hard disk based recovery partition via the F8 - Repair your computer.
But hard drives fail, and you have then lost the recovery ability, and if under warranty I have to install from fresh on new HD again, so therefore I want to create this on a physical media.

I have successfully made the WinRE DVD as stated in the OPK.

I have also successfully created my "image.wim" after the Sysprep -shutdown via Imagex of the new PC's Windows 7 installation.

So my question is how do I make the WinRE DVD i have created to automatically deploy my "image.wim" to the new hard drive for that PC?

I also presume I will need to make a DISKPART script to create the 200mb system and primary partition for the Win 7 partitions before the "image.wim" is deployed?

The OPK documentation seems very vague?

Can this be done.

Any help would be greatly appreciated.

Thanks in advance Mike.

:huh:


#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,353
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 30 November 2009 - 10:33 AM

There are walkthroughs here to create WinRE using the WAIK:
http://technet.microsoft.com/en-us/library...28WS.10%29.aspx

Unfortunately, OPK methods use NDA (non-disclosure agreement) restrictions which means they are not to be openly shared with the public. The WAIK instructions should work with an OPK build. Otherwise, if you are experiencing problems specific to the OPK instructions, you should contact your TAM or Microsoft Rep to acquire the correct help.

#3 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 30 November 2009 - 01:10 PM

TY, but that is the same guide I am using, it tells you how to create the WinRE disc, but then the help file simply moves on to the hard drive partition recovery?

Thanks Mike.

#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,353
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 02 December 2009 - 09:38 AM

Don't forget this one too:
http://technet.microsoft.com/en-us/library...28WS.10%29.aspx

#5 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 02 December 2009 - 10:20 AM

TY, yes read that one too, the REANGENTC.EXE must set up a variable call within the windows OS to look for install.wim, but this obviously does not apply to the WinRE on a DVD ?


So when you press F8 and select repair my computer it boots from the recovery partition and the WinRE looks at the Windows OS variable to find the location of install.wim...

...

#6 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,353
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 02 December 2009 - 12:53 PM

There might be a mix up here. You can make a WinRE from DVD or from HDD. When you use DVD method, there is no RE partition on the HDD at all. You likely need to have the System Partition to use WinRE in any case, since it is designed to copy files into it during recovery. So if you did your 7 install method where you only have 1 partition, WinRE isn't supported.

#7 User is offline   allanf 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 01-June 07

Posted 03 December 2009 - 11:18 PM

View PostPC Problems, on Nov 30 2009, 08:15 AM, said:

I have also successfully created my "image.wim" after the Sysprep -shutdown via Imagex of the new PC's Windows 7 installation.

So my question is how do I make the WinRE DVD i have created to automatically deploy my "image.wim" to the new hard drive for that PC?

I also presume I will need to make a DISKPART script to create the 200mb system and primary partition for the Win 7 partitions before the "image.wim" is deployed?


Hi PC,

Are you simply wanting to add an "imagex /apply" routine to the startup script, or have I missed something?

Regards :)

#8 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 05 December 2009 - 10:38 AM

TY Allan,

Yes I have had alot of thought on this and yes you are correct, the hurdle for me is how to determine the drive letter of the location of the WIM on the DVD.

The drive letter assigned to the DVD could be anything depending on how many HD's etc there are.

I dont know how to determine which drive letter is assigned to apply the image command? :unsure:

#9 User is offline   allanf 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 01-June 07

Posted 05 December 2009 - 06:11 PM

View PostPC Problems, on Dec 5 2009, 11:38 AM, said:

I dont know how to determine which drive letter is assigned to apply the image command? :unsure:


Windows PE (rather than RE) is probably a better environment for deploying from a CD/DVD.

Just the other day, I rebooted and what d'ya know - Windows RE thinks there's a serious problem, does unspecified exhaustive scans and tests, then admits that it can't fix the problem. Fortunately, on reboot, everything seemed OK. That's as much as I know about RE.


Create a uniquely-named tag file on the CD/DVD.

When Windows PE boots, run a FOR /F loop in batch script to search drives for the tag file and assign the correct drive letter to a variable.

There are a few variants of the FOR /F loop. Good luck. :)

#10 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,353
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 December 2009 - 08:25 PM

View Postallanf, on Dec 5 2009, 07:11 PM, said:

When Windows PE boots, run a FOR /F loop in batch script to search drives for the tag file and assign the correct drive letter to a variable.

There are a few variants of the FOR /F loop. Good luck. :)


It may be easier (depending on your experience) to use AutoIT. It has an @ScriptDir macro, that will find the exact path where the script resides, which can then be concat (and/or trimmed) to find the location of the WIM.

#11 User is offline   allanf 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 01-June 07

Posted 05 December 2009 - 09:21 PM

View PostTripredacus, on Dec 5 2009, 08:25 PM, said:

... an @ScriptDir macro, that will find the exact path where the script resides, which can then be concat (and/or trimmed) to find the location of the WIM.


Just guessing that the @ScriptDir macro is similar to a VB Script I've seen for finding its own path and drive....

The standard method of booting Windows PE is to load it into RAM which is assigned the drive letter x: (although the letter can now be changed using DISM when customising Windows PE 3.0).

The script (VB or batch) or autoit program would normally execute from the RAM drive, so the script (or program) itself shouldn't be too hard to find. Use the %SYSTEMDRIVE% environment variable.

The images will reside on the DVD, which would still need to be found. The FOR /F loop batch is the simplest method I have seen.

I guess there is the option of running Windows PE from the DVD, rather than RAM, in which case, the script and the images would be on the same drive. (... not sure how the drive letter is assigned in this case?)

Or, if the images are small enough, load them into RAM as well, where they can be easily found.

This post has been edited by allanf: 05 December 2009 - 09:31 PM


#12 User is offline   CLJone 

  • Group: Members
  • Posts: 5
  • Joined: 04-October 03

Posted 05 December 2009 - 09:59 PM

Hi, I have used "FOR %%I IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\DVD.TXT SET DVD=%%I:" in the past works for all the time. Place this in run command and put a "DVD.TXT" in the root of my DVD.

::Run.cmd::
FOR %%I IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\DVD.TXT SET DVD=%%I:

imagex /apply %dvd%\install.wim 1 c:

:)
Hope that works for you!!

#13 User is offline   allanf 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 01-June 07

Posted 05 December 2009 - 10:56 PM

View PostCLJone, on Dec 5 2009, 09:59 PM, said:

Hi, I have used "FOR %%I IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\DVD.TXT SET DVD=%%I:" in the past works for all the time. Place this in run command and put a "DVD.TXT" in the root of my DVD.

::Run.cmd::
FOR %%I IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\DVD.TXT SET DVD=%%I:

imagex /apply %dvd%\install.wim 1 c:

:)
Hope that works for you!!


You make it sound too easy ... :thumbup ...

And, quite right, it's not a FOR /F loop, just a plain FOR loop. I was thinking of another batch I've been working on ... :blushing: ...

#14 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 07 December 2009 - 10:19 AM

Ah wow fantastic thank you.

Just 1 silly question left, where do I put this run cmd!

Sorry I am new to WinPE and WinRE

:blushing:

#15 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,114
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 07 December 2009 - 11:31 AM

View Postallanf, on Dec 6 2009, 05:56 AM, said:

And, quite right, it's not a FOR /F loop, just a plain FOR loop. I was thinking of another batch I've been working on ... :blushing: ...

You are right :), meaning that you are WRONG. ;)


You can use a FOR /F allright, check a few posts starting from this one:
http://www.msfn.org/board/install-xp-ram-l...4-page-112.html

Actually the method depicted there is suggested since it avoids the problem of mapped drives without media (please read as "card readers"). :hello:

jaclaz

#16 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 07 December 2009 - 01:33 PM

Right, I figured out that the command goes in the startnet.cmd !! :thumbup

@ Jaclaz

Ok - so reading the post the CLJone "script" will fail with card readers, ok i get that.


Now imagine your "code" is an aeroplane, the plane left the runway and went straight OVER MY HEAD until it ran out of fuel - lol :blink: :blink:

What do I do with your code, copy it in to the startnet.cmd or something else? :whistle:

I used CLJone script and it worked, but version 1002a requires Jaclaz's code; please kindly clarify...

Thank to all so far for your really helpful replies... Without whom etc...

Mike

#17 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,114
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 07 December 2009 - 02:46 PM

No, it won't "fail": it may prompt with an error message and you'll have to click on it to continue.

This:
set tagfile=OEM
for /f "tokens=1 delims=: " %%? in ('mountvol.exe ^|find ":\"') do (
  dir %%?:\%tagfile% >nul 2>&1 && set CDDRIVE=%%?:
)
if not defined CDDRIVE (
  goto EOF
)


  • Sets variable "tagfile" to value "OEM", runs, search for the value of the variable i.e. for the tagfile "OEM" and sets variable "CDDRIVE" to the found drive letter.
  • If no drive is found with the tagfile, it ends the batch.


The example previously posted:
  • assumes "DVD.TXT" to be the tagfile, searches for it and sets variable "DVD" to the found drive letter.
  • runs imagex using as source the found drive letter, applying the wim to drive C:

you should be able to join the dots.... :whistle:


jaclaz

This post has been edited by jaclaz: 07 December 2009 - 02:48 PM


#18 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 08 December 2009 - 02:33 AM

TY Jaclaz

I will attempt to join the dots later today :rolleyes:

Because this is primarily aimed at end users, I just need to add an ending...

So at the end of the apply and bcdboot, I would like to echo "The system Recovery has finished successfully, please remove the DVD from the drive, and press any key to reboot..."

How do I actually achieve this, how do i make any key = exit?

Also this works like a dream so far, and completey recovers the partitions and OS in around 12 mins.... not bad.

Thanks Mike.

#19 User is offline   PC Problems 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 10-January 07

Posted 08 December 2009 - 02:57 AM

:wacko: :wacko:

Ok its VERY simple


pause
exit


:blushing: :blushing:

#20 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,114
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 08 December 2009 - 07:47 AM

View PostPC Problems, on Dec 8 2009, 09:33 AM, said:

So at the end of the apply and bcdboot, I would like to echo "The system Recovery has finished successfully, please remove the DVD from the drive, and press any key to reboot..."

Good. :)

See if any of these work in that environment:
http://www.technize.com/2008/07/11/four-wa...ray-in-windows/
http://www.alexnolan...commandline.htm
http://www.softpedia.com/progDownload/Ejec...load-41030.html
http://www.techtalkz.com/tips-n-tricks/397...-tool-here.html

Rerun it and change the message to ;):
"The system Recovery has finished successfully, please remove the DVD from the OPENED drive TRAY, and press any key to reboot..."

We try to please end users, and we do it harder.
:P

jaclaz

This post has been edited by jaclaz: 08 December 2009 - 07:49 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy