Jump to content

victor888

Member
  • Posts

    159
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    China

Posts posted by victor888

  1. No matter which partition you installed your xp to by usb_multiboot_10, just run it, the drive letters will be ordered correctly. just add the batch code in undoren.cmd you don't affraid the drive letter shifting when installing xp using usb hard disk. Certainly, it is no need to change migrate.inf when installing xp using usb stick, thus we need change usb_multiboo_10.cmd, do it yourself.

    ===

    batch content:

    SETLOCAL ENABLEEXTENSIONS

    SETLOCAL ENABLEDELAYEDEXPANSION

    ::get fixed drives

    echo list disk >listdisk.txt

    diskpart /s listdisk.txt >listresult.txt

    for /f "skip=8 tokens=2 delims= " %%a in (listresult.txt) do (

    echo select disk %%a >selectdisk%%a.txt

    echo detail disk >>selectdisk%%a.txt

    diskpart /s selectdisk%%a.txt >detaildisk%%a.txt

    for /f "tokens=3 skip=17" %%b in (detaildisk%%a.txt) do (

    echo %%b: >>fix.txt

    )

    del selectdisk%%a.txt

    del detaildisk%%a.txt

    )

    del listdisk.txt

    del listresult.txt

    ::get CDROM and removeable drives

    FOR /F "tokens=*" %%a in ('fsutil fsinfo drives ^| FIND /V ""') DO (

    set dr=%%a

    SET dr=!dr:~-3,3!

    SET cdr=!dr:~0,1!

    IF !cdr! GTR B (

    FOR /F "tokens=1 delims= " %%P IN ('fsutil fsinfo drivetype !dr! ^| FIND "CD-ROM"') DO (

    SET vname=%%P

    SET vname=!vname:~0,2!

    echo !vname! >>CDROM.txt

    )

    FOR /F "tokens=1 delims= " %%P IN ('fsutil fsinfo drivetype !dr! ^| FIND /i "removable"') DO (

    SET vname=%%P

    SET vname=!vname:~0,2!

    echo !vname! >>remove.txt

    )

    )

    )

    :: ording vid

    for %%a in (fix.txt CDROM.txt remove.txt) do (

    if exist %%a (

    for /f %%b in (%%a) do (

    IF %%b neq %systemdrive% (

    mountvol %%b /l >drive.txt

    mountvol %%b /d

    for /f %%c in (drive.txt) do (

    set vid=%%c

    echo !vid! >>vid.txt

    )

    )

    )

    )

    )

    for %%d in (C 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 %%d: neq %systemdrive% (

    echo %%d >>drv.txt

    )

    )

    if exist "fix.txt" del fix.txt

    if exist "cdrom.txt" del cdrom.txt

    if exist "remove.txt" del remove.txt

    for /f "tokens=*" %%a in (vid.txt) do (

    set /a n+=1

    set _!n!=%%a

    )

    set n=0

    for /f "tokens=*" %%i in (drv.txt) do call :lp %%i

    for /f "tokens=1,2 delims= " %%a in ('findstr "\\" c.txt') do mountvol %%b: %%a

    del drv.txt

    del vid.txt

    del drive.txt

    del c.txt

    exit

    :lp

    set /a n+=1

    echo !_%n%!%1>>c.txt

    ===

    below is original

    After installing XP from USB hard disk, the drive D letter is for USB hard disk's first partition, while E F G ... is the first hard disk's second, third, fourth ... drive letter respectively. We need such drive order: C D E F drive letter belongs to the first hard disk, and G belongs to the USB hard disk.

    These two files just do the job.

    No prolem, its safe.

    the content of drivechange.cmd

    ECHO Program - DRVCHANG.CMD - 26 Sep 2008 - Date = %DATE% %TIME:~0,8%

    CLS

    rem SETLOCAL ENABLEEXTENSIONS

    SETLOCAL ENABLEDELAYEDEXPANSION

    SET USBDRIVE=

    SET TAGFILE=\usbflash

    FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:

    echo select disk 0 >selectdisk.txt

    echo detail disk >>selectdisk.txt

    diskpart /s selectdisk.txt >detaildisk.txt

    echo %usbdrive:~0,1% >drv.txt

    for /f "tokens=3 skip=18" %%a in (detaildisk.txt) do (

    set drv=%%a

    echo !drv! >>drv.txt

    mountvol %%a: /l >drive.txt

    for /f %%b in (drive.txt) do (

    set vid=%%b

    echo !vid! >>vid.txt

    )

    )

    mountvol %usbdrive% /l >drive.txt

    for /f %%c in (drive.txt) do set vid=%%c

    echo %vid% >>vid.txt

    call c.cmd

    del selectdisk.txt

    del detaildisk.txt

    del drive.txt

    del drv.txt

    del vid.txt

    for /f "tokens=2 delims= " %%a in (c.txt) do mountvol %%a: /d

    for /f "tokens=1,2 delims= " %%a in (c.txt) do mountvol %%b: %%a

    del c.txt

    EXIT

    the content of c.cmd

    @off

    setlocal enabledelayedexpansion

    if exist c.txt del /q c.txt

    for /f "tokens=*" %%a in (vid.txt) do (

    set /a n+=1

    set _!n!=%%a

    )

    set n=0

    for /f "tokens=*" %%i in (drv.txt) do call :lp %%i

    goto :eof

    :lp

    set /a n+=1

    echo !_%n%!%1>>c.txt

    so, we can revise undoren.cmd and add above code and c.cmd file, drive leter will rearranged corrcetly after first logon.

    I hope you can optimize two files in one.

    orderdrv2.rar

  2. First to claim I have read all the relative posts, tutorials and instructions about INSTALL XP FROM USB.

    I still can't fully understand the drive letter shifting if install xp with usb hard disk.

    I know the role of rdummy.sys is to make usb hard disk to be seen as removable during TXT setup.

    After first logon the usb hard disk's first partion is seen as removable, but the drive letter is D. After the second logon, because we disable rdummy.sys by guirunonce, hard disk gets right partions and drive type.

    That is, rdummy.sys can only make the usb hard disk to be seen as removable during TXT setup, thus it will not be recognized as first hard disk and has drive letter C when selecting partitions by xp setup.

    One question is that in usb_multiboot10, there are some lines:

    ECHO Make USB-stick in XP Setup to be Preferred Boot Drive U: Enter: y

    ECHO.

    ECHO For Mixed SATA / PATA Config: Don't change migrate.inf Enter: n

    The above selection doesn't tell if usb hard disk used, when Y is selected, when first logon, will the usb hard disk's first partion get drive letter U? That is if the modification made to migrate.inf does work for usb hard disk.

    I guess all the drive letters are allocated during GUI setup, but how to change USB hard disk drive letters during this period?

  3. I want to reinstall xp so I quick formated the first partition with NTFS format and then went on installing xp with my USB-HDD stick (only one NTFS partition prepared by mass production tool) processed by usb_multiboot10.

    During the whole installing process and first logging on I didn't unplug it. Finally I found two same xp boot option in boot.ini file.

    I down't know why.

    Have to say this install-xp-from-usb method, you have to reallocate disk letters on the hard disk because the usb-hdd partition ocuppy the D letter.

    Even something strange happened too, after installing on another pc, I found undoren.cmd doesn't work. I have to rename it mannully.

  4. I got a way.

    Format the flash stick with ntfs format and only leave erveryone group and give read right to it. Thus the system is "write protected". So I think batch file undoren.cmd, ren_fold.cmd is no use.

    If you want store data on it, just give full control right to everyone group of a folder on this NTFS partion.

    ==

    I leave "system" account with full control right for above bach files to work.

  5. Install xp on usb is very good. But how to protect the data on it if without write-protect key?

    Finally I found a good way.

    Using NTFS format plus abnormal directory.

    Format the USB disk with NTFS format and use usb_multiboot10 to make it multiboot. Also we need make personal directory on the usb disk for example make directory UDATA which is used for storing personal data.

    Open MY COMPUTER and right click the USB drive letter and only keep everyone and system account.

    Only give erveryone account read right. We can find that the system account has full right thus REN_FOLDER.CMD does work.

    For the sake of UNDOREN.CMD's working after first logon, we need edit this batch file, see below:

    @echo off

    SET USBDRIVE=

    SET TAGFILE=\WIN_NT.BT

    :: First Limited Range to Prevent Windows No Drive Alert due to Cardreader

    :: For case of Repair Install when Drive not found, than Extended Range and

    :: Windows No Drive Alert - Press 4x Continue for Cardreader Drives

    FOR %%h IN (C D M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:

    if "%USBDRIVE%" == "" (

    FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:

    )

    cacls %USBDRIVE% /e /g administrators:f

    ren %USBDRIVE%\txtsetup.bak txtsetup.sif

    ren %USBDRIVE%\WIN_NT.BT $WIN_NT$.~BT

    ren %USBDRIVE%\WIN_NT.LS $WIN_NT$.~LS

    cacls %USBDRIVE% /e /r administrators

    exit

    above red line is new added. So the undoren.cmd does work.

    Give everyone account with full right on UDATA directory.

    Use winrar open the USB drive and rename the UDATA directory to UDATA..\

    Thus the directory become UDATA. under windows and not accessable.

    How to open it?

    Lets make a shortcut on the root directory of the usb drive. The command is cmd.exe /c "echo off&&FOR %h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST %h:\usbflash start %h:\udata~1"

    . Do not forget right click the shortcut again and select propties, delete %windir% from start position. OK, just click it UDATA is opened.

  6. not only u3 flash stick but also nearly every flash with a peroper mass production tool can image a usb cdrom.

    a usb stick is made of tow main parts which is control chip and flash chip. the control chip controls the flash chip.

    already sb use control chip software (we call mass production tool)divide a usb stick into 3 hard usb devices: usbcdrom, usb hdd/zip, usb floppy. thus 3 ways got to usb booting the system.

    If you know Chinese please come here: http://bbs.wuyou.com/forumdisplay.php?fid=45

  7. USBMULTIBOOT is perfect, I think we can put XP source and all necessary files on USB-DISK in one package such as ISO or IMG file and use grub4dos to boot it and install to local hard disk. There two obvious advantages one is safety the other is we needn't to care USBDISK's file format for we can select file type in ISO/IMG package.

    Also I think we can boot this ISO/IMG via grub4dos installed on hard disk or usb cdrom or other device.

    Maybe one problem is when map ISO/IMG as hd0 or else, is it possilbe? how about the speed?

    I will try later.

    ANY SUGGESTION?

    THANKS.

  8. hi, everyone.

    I do a lot of search before ask the question. no direct answer got.

    I download a new customized pe 2.0 and want to add the windows vista installation dvd by using easyboot.

    I confused that the file names a and directory structures are all same as that of vista DVD'S.

    Certainly I can't use boot.wim in pe 2.0 to replace that of vista. As for other files and folders, I think they are same. just one copy is enough.

    who can help?

    THX

×
×
  • Create New...