Sie sind auf Seite 1von 7

[Tutorial] Boot Windows 7 from USB hard disk by karyonix

From this thread --> http://www.boot-land.net/ forums/ index.php?


showtopic=905
!nstall in !"#/$%&% dis' and mo(e to )$*
. %ttach !"#/$%&% dis' to computer
+ou can create a new partition and mar' it as acti(e partition before
boot from ,indows - "."
/. *oot from ,indows - setup "." 0or other media12
create a partition in $%&% 0if not alread3 created12
use dis'part to mar' partition as acti(e 0if it is not the onl3 partition in
the computer12
install ,indows -
4. *oot from $%&% dis' into new ,indows -
5. 6un cmd as administrator
CODE
bcdedit /set {default} detecthal on
5. 6un usbbootfix.bat as administrator
CODE
@echo off
if "%1"=="fix" goto :fix
rem -- install task
copy /y "%~f0" "%SystemRoot%\system32\usbbootfix.bat"
SCHTASKS /Create /RU SYSTEM /SC ONEVENT /MO
"*[System[Provider[@Name='Microsoft-Windows-UserPnp'] and
EventID=20003]]" /EC System /TN USBBootFix /TR
"'%SystemRoot%\system32\usbbootfix.bat' fix" /F
rem -- apply other settings
reg add HKLM\SYSTEM\CurrentControlSet\services\pciide /v
Start /t REG_DWORD /d 0x0 /f
reg add HKLM\SYSTEM\CurrentControlSet\services\intelide /v
Start /t REG_DWORD /d 0x0 /f
reg add HKLM\SYSTEM\CurrentControlSet\services\viaide /v
Start /t REG_DWORD /d 0x0 /f
rem -- run :fix once after install
:fix
call :fixservice usbehci "Boot Bus Extender"
call :fixservice usbohci "Boot Bus Extender"
call :fixservice usbuhci "Boot Bus Extender"
call :fixservice usbhub "System Bus Extender"
call :fixservice usbstor "SCSI miniport"
goto :eof
:fixservice
setlocal
set Start=
set Group=
for /f "skip=2 tokens=1,2,*" %%I in ('reg query
HKLM\SYSTEM\CurrentControlSet\services\%~1') do (
if "%%I"=="Start" set Start=%%K
if "%%I"=="Group" set Group=%%K
)
if not "%Start%"=="0x0" reg add
HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Start /t
REG_DWORD /d 0x0 /f
if not "%Group%"=="%~2" reg add
HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Group /t
REG_SZ /d "%~2" /f
endlocal
goto :eof
7. $hutdown.
-. 8ut $%&% dis' in )$* $%&% dis' enclosure
or clone ,indows - to )$* dis' 0see below1.
9. *oot from )$* dis'
,hen ,indows detect new hardware and install dri(ers automaticall32
it will also run usbbootfix.bat automaticall3.
!f 3ou install )$* dri(ers 0or motherboard or chipset dri(ers1 b3 other
wa3s2 3ou should run usbbootfix.bat a:ain before shutdown or reboot.
;lonin: ,indows - from !"#/$%&%/.<" dis' to )$* dis'
"on=t use runnin: ,indows as source dri(e.
. %ttach tar:et dis' to computer.
/. ;reate partition in tar:et dis' and format 0if not alread3 exists1. >ar'
as acti(e partition.
4. !f source *;" is not in source ,indows partition2 manuall3 cop3
bootm:r and *;" to tar:et partition.
5. $a(e clone7.bat it in a director3.
CODE
@echo off
setlocal
rem Source drive, Destination drive
set src=S:
set dst=T:
set bcdentry={default}
set bcddrive=%dst%
echo List of files to be copied
xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e
/c /i /h /k /x /y /b /l
echo Copy files from %src% to %dst%
xcopy %src%\ %dst%\ /exclude:%~dp0\cloneexclude.txt /e
/c /i /h /k /x /y /b /w
echo Make sure boot manager are not compressed.
compact /u %dst%\bootmgr %dst%\ntldr %dst%\grldr.* %dst
%\menu.lst
echo Adjust \DosDevices\C: value
set dstsignature=
for /f "skip=2 tokens=1,2,*" %%I in ('reg query
HKLM\SYSTEM\MountedDevices /v \DosDevices\%dst%') do (
set dstsignature=%%K
)
reg load HKLM\systemdst %dst
%\Windows\system32\config\system
reg add HKLM\systemdst\MountedDevices /v \DosDevices\C: /t
REG_BINARY /d %dstsignature% /f
reg query HKLM\systemdst\MountedDevices /v \DosDevices\C:
reg unload HKLM\systemdst
echo Copy bootmgr, BCD to %bcddrive%
if not exist %bcddrive%\bootmgr xcopy %src%\bootmgr
%bcddrive%\bootmgr /c /h /k /x /y
if not exist %bcddrive%\Boot\BCD xcopy %src%\Boot\ %dst
%\Boot\ /e /c /i /h /k /x /y /b
if not exist %bcddrive%\Boot\BCD goto endbcd
echo Update BCD entry.
bcdedit /store %bcddrive%\Boot\BCD /set {bootmgr} device
partition=%bcddrive%
bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry% device
partition=%dst%
bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry%
osdevice partition=%dst%
bcdedit /store %bcddrive%\Boot\BCD /set %bcdentry%
detecthal yes
bcdedit /store %bcddrive%\Boot\BCD
:endbcd
endlocal
5. ,rite names of unwanted files and directories in cloneexclude.txt and
sa(e in the same director3.
CODE
:\RECYCLER
:\$Recycle.Bin
:\System Volume Information
:\PerfLogs
:\hiberfil.sys
:\pagefile.sys
:\bootstat.dat
\Temp\
\Temporary Internet Files\
7. ?pen cmd.exe runnin: as $+$&#> account.
a. *oot from ,indows - "." and press F0 to run cmd.exe.
or
b. from another ,indows .ista/- 0not on source partition1
@et $3sinternal 8s#xec.
)nAip 8s#xec.exe.
;reate shortcut systemcmd.
CODE
psexec.exe -s -i -d cmd
,hen 3ou run this shortcut as administrator2 it will open
cmd.exe runnin: as $+$&#> account.
+ou can increase its screen buffer siAe b3 ri:ht-clic' title bar2
select 8roperties2 Ba3out pa:e.
-. ?pen clone7.bat in notepad or other text editor.
$et appropriate (alue for src and dst in clone7.bat.
!f dst is in .<"2 set bcddrive to acti(e partition of the host dis'
containin: dst.
9. run clone7.bat from cmd.exe runnin: as $+$&#> account.
.erif3 that source and destination dri(e are correct and press a 'e3 to
start cop3.
9. $hutdown
%nother wa3 to install
!nstall in .<" b3 usin: (irtual machine 0,indows .irtual 8; or .irtual*ox1
Cote : Cot all editions of ,indows - support nati(e-boot .<".
?nl3 ,indows - #nterprise and )ltimate 0includin: 6elease ;andidate1
support nati(e-boot .<".
. ;reate partition in )$* dis' 0):12 format2 ma'e it acti(e partition.
/. )se "is' >ana:ement or "is'part to ;reate .<" ima:e2 siAe 5@* or
more.
4. !n ,indows .irtual 8; folder or .irtual*ox2 create (irtual machine 6%>
@* or more
5. %ttach .<" and ,indows - "." or !$? to (irtual machine
5. $tart (irtual machine2 boot from "."2 install ,indows -
7. ;op3 usbbootfix.bat to .<" 0b3 networ' share or mount .<" in host1.
-. !n (irtual machine2 run usbbootfix.bat as administrator
9. $hutdown (irtual machine.
9. !n "is' >ana:ement in ,indows - host2 attach .<".
0.!f 3ou Dust want to use .<" as source for clonin: to )$* dis'2 s'ip the
followin: steps and :oto ;lonin: ,indows - abo(e.
!f 3ou want to nati(e-boot .<"2 adDust *;" entr3 for nati(e-boot .<"
with the followin: steps.
.Bet=s assume )$* dis' partition is ): and ,indows partition in
):Ename.(hd is .: in host computer
/.;op3 bootmgr and Boot director3 from .:E to ):E
4.6un cmd as administrator in host
CODE
bcdedit /store U:\Boot\BCD /set {default} device
partition=V:
bcdedit /store U:\Boot\BCD /set {default} osdevice
partition=V:
bcdedit /store U:\Boot\BCD /set {default} detecthal on
5.detach .<" from host
5.boot from .<" in )$*

Das könnte Ihnen auch gefallen