Jump to content

Copying files


Recommended Posts

Hi Guys,

i'm having difficultys copying files to my target machine.

In the microsoft's guide of WinRe it says when creating an image based recovery you'll have to copy your Winre.wim to the target machine's root. and run some scripts.

Windows RE can also be installed directly as a .wim file instead of an expanded image on the hard disk partition. When this configuration is used:

• The Windows RE .wim image file must be named winre.wim.

• The Windows RE .wim image file must be located at the root directory of the target

and
You will need to create the script CopyWinRE.cmd to copy the Windows RE image to the target partition

but what sort of command's do i put into the script? i tried with an xcopy and copy command, but that díd'nt work.

i alse have difficultys running scripts on my target machine, i want to automatticly run the SetAutoFailover.cmd on the target machine to set the WinRe options but that doe not work also.

the command line for this is "setautofailover.cmd /wim /target d: /mainos {default} /disk 0 /partition 1", i want to run it automatic to set the first partition to WinRe. what i don't get is the d: is this the drive where the os is on? i searched the microsoft site for explanation of these options but i could'nt find them.

what in my xml file is :

- <RunSynchronous>

- <RunSynchronousCommand wcm:action="add">

- <Credentials>

<Domain></Domain>

<Password></Password>

<Username></Username>

</Credentials>

<Description>copywinre</Description>

<Order>1</Order>

<Path>D:\RemoteInstall\data\Scripts\CopyWinRe.cmd</Path>

</RunSynchronousCommand>

</RunSynchronous>

</component>

thanks in advance

chaos2305

Edited by chaos2305
Link to comment
Share on other sites


i tried with an xcopy and copy command, but that díd'nt work.
Well it should work with xcopy. How was your command looking like exactly?
the command line for this is "setautofailover.cmd /wim /target d: /mainos {default} /disk 0 /partition 1", i want to run it automatic to set the first partition to WinRe. what i don't get is the d: is this the drive where the os is on? i searched the microsoft site for explanation of these options but i could'nt find them.

The d: is an example only. d: is the target, where winre.wim is located. If you open the setautofailover.cmd you will find a very short explanation at the end of the file.

If you don't have a d: drive - cause you're just using one drive for example - than use c: instead of d:. The WAIK-Walkthrough is creating two partitions on your drive, one for VistaOS and one for WinRE. This is the reason why they are using d: for setautofailover.cmd.

Hope that'll clear it up a little bit.

Martin

Link to comment
Share on other sites

Thanks martin,

So i have to copy my winre to c: en that change the target to c:?

The command i use in my .cmd file is :

copy \\wsus\winre\winre.wim C:\

and the 2nd command file is is

xcopy \\servername\data\Scripts\SetAutoFailover.cmd %windir%\system32\scripts\

%windir%\system32\scripts\setautofailover.cmd /wim /target c: /mainos {default} /disk 0 /partition 1 (this command is to run the setautofailover command)

Yesterday i copyd the winre.wim to c: manually en ran the setautofailover command. my first partition is indeed hidden, so i think the setautofailover has worked, but how can i test if the failover works? i tried to startup and pressed F8. but when i choose repair, the system askes me to instert my vista dvd.....

maybe i am doing something wrong? these are the steps i took to create my installation :

<?xml version="1.0" encoding="utf-8" ?>

- <unattend xmlns="urn:schemas-microsoft-com:unattend">

- <settings pass="windowsPE">

- <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <WindowsDeploymentServices>

- <Login>

- <Credentials>

<Domain></Domain>

<Password></Password>

<Username></Username>

</Credentials>

</Login>

- <ImageSelection>

- <InstallTo>

<DiskID>0</DiskID>

<PartitionID>2</PartitionID>

</InstallTo>

</ImageSelection>

</WindowsDeploymentServices>

- <DiskConfiguration>

- <Disk wcm:action="add">

- <CreatePartitions>

- <CreatePartition wcm:action="add">

<Order>2</Order>

<Size>40000</Size>

<Type>Primary</Type>

<Extend>false</Extend>

</CreatePartition>

- <CreatePartition wcm:action="add">

<Order>1</Order>

<Size>5000</Size>

<Type>Primary</Type>

</CreatePartition>

</CreatePartitions>

- <ModifyPartitions>

- <ModifyPartition wcm:action="add">

<Active>true</Active>

<Extend>true</Extend>

<Format>NTFS</Format>

<Label>OS</Label>

<Letter>C</Letter>

<Order>2</Order>

<PartitionID>2</PartitionID>

</ModifyPartition>

- <ModifyPartition wcm:action="add">

<Active>false</Active>

<Extend>false</Extend>

<Format>NTFS</Format>

<Label>WinRe</Label>

<Order>1</Order>

<PartitionID>1</PartitionID>

</ModifyPartition>

</ModifyPartitions>

<DiskID>0</DiskID>

<WillWipeDisk>true</WillWipeDisk>

</Disk>

</DiskConfiguration>

</component>

</settings>

- <settings pass="oobeSystem">

- <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <Reseal>

<Mode>Audit</Mode>

</Reseal>

</component>

</settings>

<cpi:offlineImage cpi:source="catalog:d:/distribution/operating systems/install_windows vista ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

</unattend>

and for the creation of the WinRe i followed most of the microsofts manual...

thanks in advance

Link to comment
Share on other sites

i tried to startup and pressed F8. but when i choose repair, the system askes me to instert my vista dvd.....

You need to edit the boot code with BCDEdit to correct this. Look in WAIK-Help for BCDEdit and look in setautofailover.cmd again to find out more about.

Setautofailover.cmd is working with BCDEdit, too, to boot the WinRE.

Martin

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for your awnsers guys,

The problem is like the folloeing at the moment :

The Adddataimage option just doen not do anything so i'm lokking for an awnser for that one. But, when i copy my WinRe.wim to the 1st partition and run the scripts, nothing happens (i get an error message that some files cannot be found). when i copy boot.sdi , diskpart.exe and bcdedit.exe to the same drive, the srip runs better, but still.... no recovery possibility. i can press f8 at boot and choose what option i want to like to do, but now recovery for me for now. tomorrow i am gonna try to make an winre image from an original dutch cista image and hope that that will work. (maybe microsoft has added something or changed something, i don't know)

And i'm gonna test if the machine has to be sysprepped and activated to let WinRe work fine. also another vague area for me. ( a long with a lot of other WinRe things, but first things first)

thanks

Link to comment
Share on other sites

The Adddataimage option just doen not do anything so i'm lokking for an awnser for that one.

I can give you that answer. There's a bug in Windows setup that prevents WinRE from being installed before the specialize phase of setup.

Only way you can get it to work is by running it after that phase (specialize, audituser for instance) through a batch file. I have it working like this.

I created 2 partitions, first one for my recovery purposes and assigned drive letter z: to it, but made it partition 1. Second one for my OS, made it partition 2 and assigned drive letter c: to it. Install your OS on the OS partition, afterwards run a batch file with "imagex /apply <path of your WinRE image> 1 z:" and it should deploy nicely.

Only thing you have to do next is to run the setautofailover.cmd /target z: and you're all done. The drive letter will disappear because it's made hidden and you should boot nicely into the recovery console.

Edited by Jopster
Link to comment
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...