Installing WinRE to hard disk
#21
Posted 13 October 2011 - 07:41 PM
If you mount your winre.wim and look at the structure, you should be able to make a functional WinPE to replace it. Or even you can try to add packages to the mounted winre.wim.
I've not tried to modify a Win7 winre.wim other than adding XML and injecting RAID drivers.
#22
Posted 14 October 2011 - 08:50 AM
Tripredacus, on 13 October 2011 - 07:41 PM, said:
If you mount your winre.wim and look at the structure, you should be able to make a functional WinPE to replace it. Or even you can try to add packages to the mounted winre.wim.
I've not tried to modify a Win7 winre.wim other than adding XML and injecting RAID drivers.
Hey tripredacus
I already added HTA and SCRIPTING with DISM /image:C:\WINRE\MOUNT /addpackage /packagepath:PATH-TO-PACKAGE
worked well.... but when I boot to this image and run MY-HTA.HTA via CMD it don´t know with which programm the OS should open it (as windows does when the file-type is unknown) ... I could open with EDITOR, but i want to execute it ... maybe i have to open with MSHTA... I´ll try immediately
I do not have the MSXML-Package... Which Packages are nessassary for HTA? Or do I have to completely rebuild a WINRE.WIM and add the MSXML via
PEIMG before i /PREP the image?
or can I download the MSXML-Package.CAB somewhere
Greetings and thx so far....
EDIT:
Maybe i´ll build a new WINRE.WIM, so i simply can add the nessassary packages with PEIMG.EXE, but can´t remember what´s needed. For Vista i think there where 3 Packackes required, but can´t can´t remember and do not know if 7 is the same way...
SORRY, forgot to answer:
OS: Windows 7 SP1
%PROCESSOR_ARCHITECTURE%=x64
AMD64
This post has been edited by Schiiwa: 16 October 2011 - 08:54 PM
#23
Posted 16 October 2011 - 07:14 PM
With Visual C++ and Quick Batch File Compiler ....
Description and Icon is fine, but it do not want to run. The problem:
The subsystem needed to support the image type is not present
I guess the reason is the architecture. WinRE is x64 and the created exe is a Win32 application ... but maybe i am wrong
This post has been edited by Schiiwa: 16 October 2011 - 07:27 PM
#24
Posted 16 October 2011 - 08:56 PM
http://www.msfn.org/...552#entry979552
Thx for assisstance tripredacus. I guess you´re bussy at the moment
#25
Posted 17 October 2011 - 03:58 AM
#26
Posted 21 October 2011 - 03:21 AM
Maybe anyone knows
Bye and have a nice week-end!
This post has been edited by Schiiwa: 21 October 2011 - 03:22 AM
#27
Posted 21 October 2011 - 08:23 AM
Schiiwa, on 21 October 2011 - 03:21 AM, said:
Setup can install it, but if your captured image used /unattend switch with sysprep, the answer file is ignored. Your image (after setup) will boot to OOBE and all settings that would normally be done during sysprep first boot (Specialize, oobeSystem) are ignored.
#28
Posted 22 October 2011 - 11:56 AM
But want to use my EXE-->HTA-->CMD anyway....
Worked fine and had 4 successful recoverys in my test-procedure, yet !
But now ReAgent makes trouble and do not want to run! Can´t ENABLE/DISABLE/SET-A-SETTING. Also the suddenly appearing directory:
Z:\Recovery\System32\Recovery
Confuses me. It Contains the ReAgent.xml, which is normaly located at C:\Windows\System32\Recovery! But If I change any value in any of any ReAgent.xml, it doesn´t have affect on the output of:
"Re-Agentc.exe /info"
So where does ReAgentC.exe get the information which u can see with added /INFO - parameter?
I can´t exacly say, what caused this behaviour. Maybe the ID=27 was no good idea, as the partition is not in front of the system's one. I've read all the documentations month ago, but I wanted to force a hidden recovery-partition
This is what I certainly did before:
- exchanged the WinRE.wim - removed the letter and set ID to 27 (on partition 4 )
I have the reasonable suspicion, that I can´t avoid a Re-Install
This post has been edited by Schiiwa: 24 October 2011 - 08:38 AM
#29
Posted 24 October 2011 - 08:42 AM
What version of Windows 7 are you using?
#30
Posted 24 October 2011 - 09:09 AM
Tripredacus, on 24 October 2011 - 08:42 AM, said:
Windows 7 x64 SP1 (with all updates)
Yea... I ran it from windows also and it returns the following:
C:\Windows\system32>reagentc /info
Erweiterte Konfiguration für die Wiederherstellungsumgebung
Windows RE aktiviert: 1
Windows RE bereitgestellt: 1
Setup aktiviert: 1
Benutzerdefiniertes Wiederherstellungstool: 1
WinRE.WIM-Verzeichnis:
Wiederherstellungsumgebung:
BCD-ID: fbf3595f-fce2-11e0-811f-a6936763aab2
Setupdateien:
Wiederherstellungsvorgang: 4
Vorgangsparameter:
Boot Startschlüssel-Abfragecode 0x8500
REAGENTC.EXE: Vorgang erfolgreich ausgeführt
But where does it get the information from?? If i change any value in any ReAgent.xml....
C:\Windows\System32\Recovery\ReAgent.xml C:\Recovery\System32\Recovery\ReAgent.xml Z:\Recovery\System32\Recovery\ReAgent.xml
It does not change the output of this command mentioned above! Here is some more output:
C:\Windows\system32>reagentc /enable REAGENTC.EXE: Vorgang fehlgeschlagen: 57 C:\Windows\system32>reagentc /disable REAGENTC.EXE: Vorgang fehlgeschlagen: 2 Das System kann die angegebene Datei nicht finden. C:\Windows\system32>reagentc /setreimage /path Z:\Recovery\Winre\Winre.wim /target C:\Windows REAGENTC.EXE: Vorgang fehlgeschlagen: b7 Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist.
This post has been edited by Schiiwa: 24 October 2011 - 09:26 AM
#31
Posted 24 October 2011 - 10:48 AM
Has a recovery partition:

Doesn't have a recovery partition:
#32
Posted 24 October 2011 - 01:40 PM
Tripredacus, on 24 October 2011 - 10:48 AM, said:
You don´t have to show me, how the BCD looks like with or without RE-Entry
And i have to disagree:
Z:\Recovery>bcdedit /enum all /v
Windows-Start-Manager
---------------------
Bezeichner {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device partition=\Device\HarddiskVolume1
path \bootmgr
description Windows Boot Manager
locale de-DE
default {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
resumeobject {8c379756-fd54-11e0-a85f-806e6f6e6963}
displayorder {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
timeout 30
Windows-Startladeprogramm
-------------------------
Bezeichner {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
device partition=C:
path \Windows\system32\winload.exe
description Windows 7 Ultimate
locale de-DE
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence {a672b694-fd5c-11e0-8c9e-c1e0787e44b5}
recoveryenabled Yes
osdevice partition=C:
systemroot \Windows
resumeobject {8c379756-fd54-11e0-a85f-806e6f6e6963}
Windows-Startladeprogramm
-------------------------
Bezeichner {a672b694-fd5c-11e0-8c9e-c1e0787e44b5}
device ramdisk=[Z:]\Recovery\winre\Winre.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
path \Windows\System32\Winload.exe
description Windows Recovery Environment
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
osdevice ramdisk=[Z:]\Recovery\winre\Winre.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
systemroot \Windows
nx OptIn
detecthal Yes
winpe Yes
Wiederaufnahme aus dem Ruhezustand
----------------------------------
Bezeichner {8c379756-fd54-11e0-a85f-806e6f6e6963}
device partition=C:
path \Windows\system32\winresume.exe
description Windows 7 Ultimate
locale de-DE
inherit {1afa9c49-16ab-4a5c-901b-212802da9460}
filedevice partition=C:
filepath \hiberfil.sys
debugoptionenabled No
Windows-Speichertestprogramm
----------------------------
Bezeichner {b2721d73-1db4-4c62-bf78-c548a880142d}
device partition=\Device\HarddiskVolume1
path \boot\memtest.exe
description Windows Memory Diagnostic
locale de-DE
Optionen zum RAM-Datenträgersetup
---------------------------------
Bezeichner {ae5534e0-a924-466c-b836-758539a3ee3a}
description Ramdisk Options
ramdisksdidevice partition=Z:
ramdisksdipath \Recovery\Boot\Boot.sdi
Now search this id....
fbf3595f-fce2-11e0-811f-a6936763aab2
and tell me where to find it
This post has been edited by Schiiwa: 24 October 2011 - 01:42 PM
#33
Posted 24 October 2011 - 02:30 PM
Solved it right now.... Had to replace
C:\Windows\System32\Recovery\Reagent.xml
with
C:\Windows\Winsxs\amd64_microsoft-windows-winre-recoveryagent_31bf3856ad364e35_6.1.7600.16385_none_16c18f8b899480af\Reagent.xml
then it worked again.
The problem was, that in my reagent.xml was the old ID. If i've set it to 00000000-0000-0000-0000-000000000000, i've probably been able to enable it.
but i can't set back the "already made recoveries" to 0! REAGENTC /INFO still says Wiederherstellungsvorgang: 4! Any other value can be changed through ReAgent.xml (for example <OemTool state="0"/>, wich will have affect on the output of "reagentc /info")
If i set <ScheduledOperation state="4"/> to 0, reagent won´t accept it (doesn´t matter whether i do that with enabled or disagled reagent) and if i disable or enable it, it is set to 4 again
So how can i set it back again to 0? it's not dokumented anywere and i'm pretty sure, that reagentc /info doesn't take this Information from BCD
This post has been edited by Schiiwa: 24 October 2011 - 07:11 PM
#34
Posted 25 October 2011 - 09:02 AM
Schiiwa, on 24 October 2011 - 02:30 PM, said:
If i set <ScheduledOperation state="4"/> to 0, reagent won´t accept it (doesn´t matter whether i do that with enabled or disagled reagent) and if i disable or enable it, it is set to 4 again
So how can i set it back again to 0? it's not dokumented anywere and i'm pretty sure, that reagentc /info doesn't take this Information from BCD
Wiederherstellungsvorgang = RecoveryOperation.
On a fresh install, while still in audit mode, the Recovery Operation value is 4 and the BCD Id is all 0s.
After sysprep /oobe, Recovery Operation = 4 but the BCD Id has a new value.
I can't do a recovery test on this system because I need it for other things atm. I wonder if that BCD Id ever changes after a recovery... but its obvious that Sysprep makes some changes once it goes into oobeSystem pass.
Anyways, I don't think ScheduledOperation state is the amount of recoveries run. Perhaps 0 is an invalid value? I've seen online some examples of 3, 4 and 5. Also Reagent.dll has the ability to write XML, so maybe if it sees an invalid value it changes it to whatever the default is?
#35
Posted 28 October 2011 - 06:19 AM
Tripredacus, on 25 October 2011 - 09:02 AM, said:
You don´t have to
Tripredacus, on 25 October 2011 - 09:02 AM, said:
I found spoted that a disabled reagentc resets the BCD-ID to 000.....(in reagent.xml). I deleted the whole BCD and did a reset of my startupfiles with these:
bootsect /mbr bootrec /fixboot bootrec /fixmbr bootrec /rebuild bcd
TWICE
The first time, everything went fine and I could re-enable it, because when I did the reset, the reagent was disabled. Btw. REAGENT also builds the nessassary BCD-entries for Rec.-Env.!!!
The second time i obviously did the reset with enabled reagent, so the ID in reagent.xml couldn't find the ID in my BCD. It was also strange to me, that the rec.-env. entries didn't appear again in the BCD without creating them manually. I created them, but with another ID, so reagent still couldn't find the ID from the xml
Now, everything is discovered, also with the RecoveryOperation-parameter, you are right. So stupid that i interpreted it as the count, because i did 4 recoveries, when i looked in reagent.xml the first time
Thx for the standby .... Schiiwa
Also I don't like reagent very much, because it puts the winre.wim in this nasty GUID-subdir
This post has been edited by Schiiwa: 28 October 2011 - 06:37 AM
#36
Posted 28 October 2011 - 08:20 AM
Schiiwa, on 28 October 2011 - 06:19 AM, said:
I am going to think that its possible your WinRE is set up differently from mine. I have not seen a time where the winre.wim goes into a GUID directory. But never fear, at least we have Reagentc now... in Vista there was no such thing and frankly I'm glad Windows 7 WinRE is so much easier. I only had to build 1 recovery partition using the Vista tech and it was for Server 2008 Embedded Web. I'm glad about it and have mostly forgotten how exactly it was done.
#37
Posted 04 December 2011 - 07:12 PM
Can't unterstand that as well. Maybe you used the reagent of the pre-SP1-Windows (7600). Mine always created the Guid-dir as subdir (7601).
I now am using the first partition as boot/recovery-partition. Second is windows. Why does the system not want to boot, when deleting the second one?
P.S.: The BOOT\BCD is stored on PARTITION1 (Windows did this when starting setup!)
This post has been edited by Schiiwa: 04 December 2011 - 07:26 PM
#38
Posted 05 December 2011 - 09:18 AM
#39
Posted 05 December 2011 - 12:40 PM
But it booted to windows anyway, but nearly no services been available... Renamed it, after a funny windows-boot ...
Anyway, this all doesn't matter to my question:
Tripredacus, on 05 December 2011 - 09:18 AM, said:
This is another strange thing to me! Why should the WinRE-partition be the first? I 've read, that the main for this reason is, that there is the possibility to boot to winre, even if the OS-Partition gets corrupt! But why the h... won't it boot without Windows. All this could be simplyfied if the WinRE-Partition would ALWAYS be the active one!?? Isn't it the Case, that normaly the 100MB-partition is the active one?
I have 3 partitions at the moment:
- 1st WinRE
- 2nd Windows
Do i have to use 3 to make that work:
- 1st WinRE
- 2nd System-Reserved
- 3rd Windows??????
I ask because i think to remember that the System-Reserved is the Active one, isn't it?
Slowly i begin to understand why u guys don't use the Windows recovery
So i could have left the Recovery-Partition as the 4th one without ANY disadvantages!!
P.S.:
I have no access to the PC right now, but ...
i'm sitting in front of a Vista-notebook, which has also a WinRE... I looked at the details of partition1(winre), and as u said, it is not the active one. But strangly here there are 2 BCDs, one on the Windows, and another one on the WinRE. The Mini-desktop with Windows 7 has just one on the recovery-partition!
This post has been edited by Schiiwa: 05 December 2011 - 01:16 PM
#40
Posted 05 December 2011 - 03:34 PM
Anyways, the System Reserved partition may not be 100% required, but since creating it with a recovery partition is required (for support purposes) I never tried to deploy it without one. But yes, the SR partition is marked as active. The order should be:
1. System Reserved
2. Recovery
3. Windows
The reason why it boots into Windows and not WinRE each time is because the WinRE partition is marked as a hidden boot volume. So in this case, the BIOS of a computer picks the first available boot volume, the one with Windows on it because it can't see the WinRE partition.
The reason to put the recovery partition first, or the service partition even back in XP days at the beginning of the disk did have some sort of reason for it. I forgot it by now. But you can definately have a recovery partition after the OS volume, for example I always installed the SoftThinks recovery partition (for XP) at the end of the disk just because it was easier to do, and they didn't seem to care what partition it was when dealing with support issues.
It would appear that none of my Microsoft documentation talks about the relevance of the location of the recovery partition.
- ← BSOD during WAIK Customization of WinPE Image
- Windows PE
- WinPE wpeinit.exe ignoring ImageInstall →



Help

Back to top









