Gremo Posted March 17, 2011 Author Posted March 17, 2011 (edited) I'm booting into WinRE from and hidden partition. WinRE gets letter "X" assigned to it, and I'm trying to call windows setup in order to perform an unattended windows install, but I have to specify install.wim location (and possibly Unattend.xml location). I know I can put Unattend.xml into WinRE.wim and then use the switch /unatted:X:\Unattend.xml. However the problem is that install.wim should reside in the recovery partition.X:\sources\setup.exe /installfrom:??The big problem is that I don't know which letter is assigned to the recovery partition when WinRE boots. Any ideas? Is there anyway to specify install.wim location without dealing with letters or in a more dynamical way? This is the partition layout (and relevant files):Partition 1 label=Recovery, id=27, active |_ install.wim |_ Unattend.xml |_ Recovery |_ WindowsRE |_ WinRE.wimPartition 2 label=WindowsThank you very much for helping. Edited March 18, 2011 by Tripredacus
Tripredacus Posted March 18, 2011 Posted March 18, 2011 (edited) 1) Because i resource hacked setup.exe.mui, can windows blame about it?2) (most important one) What happens if the user (following the setup process) wants to destroy all partitions (e.g. deletes the hidden recovery partition?) I think I should write an unattend.xml that skips the partition process and just formats C:, but i don't know how to do this. Is C: partition always the second one of the first disk 0, right?Should be quite clean what I mean, isn't it? Again, thanks for helping. 1) I do not know why you needed to do a reshack on the file. See now you have two options there.... 2) In a supported environment, running recovery (ah then again I haven't tested custom WinRE.... maybe I will do that today) won't touch other partitions. As far as how your recovery process works, you get an out by saying if the customer runs the program in any fashion not covered in your instructions, the loss of data may occur and the system's warranty will not be covered. However, if you are a System Builder, you are required to provide the edge-to-edge media anyways, so they can still reinstall Windows with that. If you are an OEM, you should follow the direction of your Partner rep.Threads merged. No need to make a new one. You can add a file to the "Recovery Partition" and search for it first, like the Vista recovery does. But just put your install.wim in Sources. Setup already knows where that is.Update - I tested the WinRE with custom partitions however there was a problem. Since the XML is inside of the Ramdisk, it is hardcoded to know where the INSTALL.WIM is, and hardcoded to what partition to install it on. Since I created a second partition in Windows, it mixed up the drive letters in WinRE. That being said, the Data partition got letter D, the OS vol got letter E and the recovery partition got letter F. Normally, the recovery partition should get letter E, and my XML has the InstallFrom to look on E. Since E is not the recovery partition, WinRE gives an error because it can't find INSTALL.WIM. Here-in lies the problem...Screenshot of system after deployment and setting up the secondary partition:Diskpart results from after receiving the error in WinRE about the WIM:DISKPART> list vol Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 C System NTFS Partition 500 MB Healthy Volume 1 E LocalDisk NTFS Partition 110 GB Healthy Volume 2 D Storage NTFS Partition 117 GB Healthy Volume 3 F Recovery NTFS Partition 6000 MB Healthy HiddenUpdate2 - Adding a second hard disk also caused problems with drive letter assignment. Edited March 18, 2011 by Tripredacus
Schiiwa Posted October 12, 2011 Posted October 12, 2011 (edited) Hi Jayclaz, Tripredacus and FriendsI´m now bussy with my Windows-7 RE-Partition, because i had a look at this page:http://technet.microsoft.com/en-us/library/dd744280%28WS.10%29.aspxI saw this line and thought, toooo easy: C:\Windows\System32\Reagentc.exe /setosimage /path R:\ /target C:\WindowsIt worked well, but just for a new Installation with an INSTALL.WIM from the Install-discI already copied the C:\Recovery directory to the partition (HarddiskVolume4)And the BCD is modified well, too.So i have to use a costum tool with this line:C:\Windows\System32\Reagentc.exe /setosimage /customtool /target C:\WindowsHere it says:http://technet.microsoft.com/en-us/library/dd744576%28WS.10%29.aspx<Recovery> <FactoryRecoveryTool> <RelativeFilePath>path_to_exe</RelativeFilePath> <CommandLineParam>parameter_1 parameter_2</CommandLineParam> <AdminOnly>access_level</AdminOnly> </FactoryRecoveryTool></Recovery>P.S.:But as I read Gremo´s solution with the Auto-Unattended:<Recovery> <RecoveryTools> <RelativeFilePath>..\..\Setup.exe /unattend:X:\unattend.xml</RelativeFilePath> </RecoveryTools></Recovery>I ASKED MYSELF, IF THIS MAYBE WOULD BE POSSIBLE:<Recovery> <RecoveryTools> <RelativeFilePath>IMAGEX.exe /apply F:\System.wim 1 C:\ </RelativeFilePath> </RecoveryTools></Recovery>OR<Recovery> <RecoveryTools> <RelativeFilePath>IMAGEX.exe</RelativeFilePath> <CommandLineParam>/apply F:\System.wim 1 C:\</CommandLineParam> </RecoveryTools></Recovery>I know, this solution is not the best , because if the Windows-Partition isn´t present any more, it would be applyed on another C-Drive Maybe I´ll try today, but would appreciate a more bonnie solutionP.P.S: I had a look at this:But there are 3 problems:1. What is inside Clean_part.txtMaybe:SELECT DISK 0SELECT PARTITION 2DELETE PARTITIONCREATE PARTITION PRIMARYFORMAT FS=NTFS OVERRIDE2. What is ISA.EXE; Can it replaced with IMAGEX.EXE ?3. What costum-tool-exec is used? Can i call it with MSHTA.EXE?P.P.P.S.: Still not my own PC Cheers.... SchiiwaEDIT:Another example here:http://reboot.pro/8729/But user says, doesn´t work. And whats not clear for me, what executeable "tblo" uses in WinREConfig.xml Edited October 13, 2011 by Schiiwa
Tripredacus Posted October 13, 2011 Posted October 13, 2011 But as I read Gremo´s solution with the Auto-Unattended:<Recovery> <RecoveryTools> <RelativeFilePath>..\..\Setup.exe /unattend:X:\unattend.xml</RelativeFilePath> </RecoveryTools></Recovery>I ASKED MYSELF, IF THIS MAYBE WOULD BE POSSIBLE:<Recovery> <RecoveryTools> <RelativeFilePath>IMAGEX.exe /apply F:\System.wim 1 C:\ </RelativeFilePath> </RecoveryTools></Recovery>Imagex would be faster for sure, but Setup can install a captured WIM as well. That is how I use it. The answer file is likely optional, but even if you have captured an image after using sysprep /unattend switch, Setup ignores that answer file. For example, even if your XML only specified the Locale settings (to hide the language select page of OOBE), after Setup applies the image, you'd still see that page. So if you didn't have any special settings, you don't even need to specify a custom tool or have the answer file. Just overwrite the install.wim with your custom WIM, but it still needs to be called install.wim.The only reason I needed to come up with this was because I needed the image in the recovery partition to deploy and then boot to the desktop. If the image is supposed to boot to OOBE, I don't use the custom tool option.
Schiiwa Posted October 13, 2011 Posted October 13, 2011 (edited) But as I read Gremo´s solution with the Auto-Unattended:<Recovery> <RecoveryTools> <RelativeFilePath>..\..\Setup.exe /unattend:X:\unattend.xml</RelativeFilePath> </RecoveryTools></Recovery>I ASKED MYSELF, IF THIS MAYBE WOULD BE POSSIBLE:<Recovery> <RecoveryTools> <RelativeFilePath>IMAGEX.exe /apply F:\System.wim 1 C:\ </RelativeFilePath> </RecoveryTools></Recovery>Imagex would be faster for sure, but Setup can install a captured WIM as well. That is how I use it. The answer file is likely optional, but even if you have captured an image after using sysprep /unattend switch, Setup ignores that answer file. For example, even if your XML only specified the Locale settings (to hide the language select page of OOBE), after Setup applies the image, you'd still see that page. So if you didn't have any special settings, you don't even need to specify a custom tool or have the answer file. Just overwrite the install.wim with your custom WIM, but it still needs to be called install.wim.The only reason I needed to come up with this was because I needed the image in the recovery partition to deploy and then boot to the desktop. If the image is supposed to boot to OOBE, I don't use the custom tool option.My experience is another one... I installed Windows 7 without a special ID=27 partition, because i had no time and computer at the moment, to do this job (create a RE-Partition/Image). I should allign my files and folders first, in order to be effective. but as i saw the new command (reagentc.exe), i thought it might be very easy... So after the Installation was complete, i slashed SP1, all later updates and drivers on it. Then i realized, that the WINRE.WIM is already implemented on C:\RECOVERY\d89.......\WINRE.WIM ... so i moved it onto a new partition at the end and adapted the BCD. Also the WIM captured from my ready-installed Windows.And i was really happy when i saw the new Option when i booted to WINRE at the bottom "Windows neu Installieren/Reinstall Windows" ... but when i klicked on it, there came a window up where i should select the OS i want to install (I think the editions) Unfortunately it was empty except "No Images available" my WIM was already called INSTALL.WIM and in the ROOT... Maybe I´ll try again in \SOURCES folderEDIT: TRYED and DOND WORK! DOESN´T REALLY MAKE SENSE, BECAUSE THE /SETOSIMAGE-PARAMETER´S PATH WAS SET TO F:\ .... BUT AS U KNOW, WITH MS-SOFT U NEVER KNOW So i tryed putting the INSTALL.WIM from the DVD to F:\ ... that worked and moved my stuff on "C" into "WINDOWS.OLD" in the first seconds and started copying the setupfiles immediately! But i cut off the power and moved my stuff back after taking ownership, cause i do not want to reinstall....again.... because i think i installed Windows (esspecially 95a/b/c/98/98SE) about 1K-times So it didn´t work. Maybe when I capture it before OOBE after entering AUDIT (or without), it may work!? *not again..*Can U tell my, how i can start a HTAThe HTA-Package isn´t available at the WinRE-Image yet..... i´ll add it now and come back later *hope i can still add it. Think to remember a DISM-Option to finish the WIM and then no package can be added anymore, when i created the Vista-PEEDIT: NOPE, it was the /prep command with peimg.exe Maybe thats the way, aha, aha, i like it d-_-b<Recovery> <RecoveryTools> <RelativeFilePath>MSHTA.EXE name-of-hta.hta</RelativeFilePath> </RecoveryTools></Recovery>OR<Recovery><RecoveryTools><RelativeFilePath>MSHTA.EXE</RelativeFilePath><CommandLineParam>(/)name-of-hta.hta</CommandLineParam></RecoveryTools></Recovery>EDIT: BOTH WON´T work ... Did´t expect that to work, because the ICON for the Recovery Options will be extracted for the executeable. After all, MSHTA.EXE has no ICON Cheers, Schiiwa Edited October 15, 2011 by Schiiwa
Tripredacus Posted October 14, 2011 Posted October 14, 2011 What is your OS, Vista or Win7?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.
Schiiwa Posted October 14, 2011 Posted October 14, 2011 (edited) What is your OS, Vista or Win7?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 tripredacusI already added HTA and SCRIPTING with DISM /image:C:\WINRE\MOUNT /addpackage /packagepath:PATH-TO-PACKAGEworked 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 immediatelyI 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 somewhereGreetings 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%=x64AMD64 Edited October 17, 2011 by Schiiwa
Schiiwa Posted October 17, 2011 Posted October 17, 2011 (edited) I managed the MSHTA to work now and also have tryed to compile a exeWith 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 Edited October 17, 2011 by Schiiwa
Schiiwa Posted October 17, 2011 Posted October 17, 2011 Work´s well now. you can see here:Thx for assisstance tripredacus. I guess you´re bussy at the moment B)
jaclaz Posted October 17, 2011 Posted October 17, 2011 Work´s well now. you can see here:NO , I cannot, please review my comment there. jaclaz
Schiiwa Posted October 21, 2011 Posted October 21, 2011 (edited) Im asking myself if it would have been possible to install the WIM with windows-setup (without answer-file), if I had set a /FLAG when i took the capture!??? Maybe anyone knows Bye and have a nice week-end! Edited October 21, 2011 by Schiiwa
Tripredacus Posted October 21, 2011 Posted October 21, 2011 Im asking myself if it would have been possible to install the WIM with windows-setup (without answer-file), if I had set a /FLAG when i took the capture!??? 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.
Schiiwa Posted October 22, 2011 Posted October 22, 2011 (edited) OK.... i didn't understand the /unattend-switch for sysprep till now 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\RecoveryConfuses 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 Or maybe the fact, that I didn´t compress my WinRE-Image, which had over 500 MB, caused the problem. I think to remember that there is a limitation of the size of winre.wim. But I was on good spirits as everything went just perfectly, that I've had no doubts to change a few things at a time. Of course THEN the DOOM was happening (Maybe it's important to say, that I DIDN´T RUN THE RECOVERY at this time!!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 Edited October 24, 2011 by Schiiwa
Tripredacus Posted October 24, 2011 Posted October 24, 2011 You would normally run Reagentc /info from Windows and not the PE.What version of Windows 7 are you using?
Schiiwa Posted October 24, 2011 Posted October 24, 2011 (edited) What version of Windows 7 are you using?Windows 7 x64 SP1 (with all updates)Yea... I ran it from windows also and it returns the following:C:\Windows\system32>reagentc /infoErweiterte 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 0x8500REAGENTC.EXE: Vorgang erfolgreich ausgeführtBut where does it get the information from?? If i change any value in any ReAgent.xml....C:\Windows\System32\Recovery\ReAgent.xmlC:\Recovery\System32\Recovery\ReAgent.xmlZ:\Recovery\System32\Recovery\ReAgent.xmlIt does not change the output of this command mentioned above! Here is some more output:C:\Windows\system32>reagentc /enableREAGENTC.EXE: Vorgang fehlgeschlagen: 57C:\Windows\system32>reagentc /disableREAGENTC.EXE: Vorgang fehlgeschlagen: 2Das System kann die angegebene Datei nicht finden.C:\Windows\system32>reagentc /setreimage /path Z:\Recovery\Winre\Winre.wim /target C:\WindowsREAGENTC.EXE: Vorgang fehlgeschlagen: b7Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist. Edited October 24, 2011 by Schiiwa
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now