ilko_t

How to install Windows from USB- WinSetupFromUSB with GUI

2,139 posts in this topic

As I got it you are not installing from USB, right? You just use the program as replacement of WINNT32.EXE.

Is there any reason you don't want to use the latter?

winnt32.exe /noreboot /makelocalsource /syspart:X: /tempdrive:X:

You may want to use /makelocalsource:all and /unattend:winnt.sif (/unattend:unattend.txt) in case you do MCE/tablet and use answer file.

It will prepare drive X: with the installation files, boot.ini will be prepared at end of TXT part, having one entry only.

Huh. Could be that I had no idea that was even possible... ;)

I always avoided the WINNT*.exe files like the plague because they did a horrible job of botching up a Windows install. Do it from DOS and you end up having to start the install as FAT32 and later convert to NTFS (end up with a non-native file system). Do it from Windows and you end up with a migrate.inf file that screws up your drive letters. Plus, I didn't even know about those switches ;)

0

Share this post


Link to post
Share on other sites
Here comes the first GUI for our little project.

What it can be used for adding to your USB stick/disk:

<snipped>

I like to express my Thank you to the author and many other contributors for this awesome utility tool. I have successfully tested this tool on an Asus Eee PC 901 (without CD/DVD Rom drive) using SanDisk U3 Cruzer Micro (3920MB), and it installed wonderfully.

This tool is an administrator's best friend. I'm looking forward to your future updates!

Once again, Thank you very much. Cheers!

Best regards,

FR (SG)

0

Share this post


Link to post
Share on other sites

Hey guys. I just found about this and this is a wonderful tool. KUTGW...

Just one question. I have vista on my laptop's drive and have recently added an external hard drive. On vista it shows as 2 partitions, G and H (i split it into 2 from G to G and H). Now i am planning to install XP customized version on H drive, the external drive partition. So when I run the program, in Boot.Ini adjustments: do i put Disk Nr = 1 and Patition Nr = 2 ???? And how should the Boot.ini look if i use those settings. I tried those settings and it looks like this on USB:

[boot Loader]

Timeout=15

Default=multi(0)disk(0)rdisk(2)partition(2)\WINDOWS

[Operating Systems]

multi(0)disk(0)rdisk(2)partition(2)\WINDOWS="Second part of XP Professional setup + Start Windows from hd 1 part 2" /FASTDETECT

Is this allright? I will be using a 4gb USB drive for this and this is XP Pro with SP3 and extra drivers inculded like the SATA ones for my external HD.

Thanks.

Edited by thegr8anand
0

Share this post


Link to post
Share on other sites

No the HD is SATA, it is actually an internal HD in a an external enclosure connected using sata. My internal laptop drive has 3 partitions C,D,E and the new HD has G & H.

That is what i want to to do. I want to install XP from the 4GB USB i have on this 2nd drive i have as my laptop's cd-drive is not working.

Edited by thegr8anand
0

Share this post


Link to post
Share on other sites

Ok, good there is no misunderstanding.

Assuming G amd H are primary partition syntax is right, you did it properly.

Mind you, Windows XP most likely will place boot files (BOOT.INI, NTLDR and NTDETECT.COM) on C:, where Vista is. The issue is that it will also rewrite the bootsector of C: with XP one, invoking NTLDR.

From there you have number of options:

1. Run from Vista

bootsect.exe /nt60 C:

This will place Vista bootsector on C:. Next you have to use tool such as EasyBCD to add XP to VIsta boot menu.

2. Run EasyBCD from XP and let it repair Vista bootsector.

3. Use Vista DVD for the purpose, Startup repair may fail, try bootsect instead.

4. Use grub4dos to start Vista:

http://diddy.boot-land.net/grub4dos/Grub4dos.htm

0

Share this post


Link to post
Share on other sites

Cool.

I was thinking of this: I will install XP on H and when install is complete and XP is working, i can restart and use Vista DVD to repair startup and then from Vista add an entry for XP using EasyBCD. Will this be allright?

EDIT: Forgot to ask: The XPSource has unattended settings in it, will it affect with the boot.ini settings i made and the winnt.sif settings. do i need to make changes to that to be safe?

Edited by thegr8anand
0

Share this post


Link to post
Share on other sites

Should be fine, although you can do that from XP as well by EasyBCD.

Vista DVD has an option Startup repair, I've seen cases when it fails to rewrite the bootsector. If this happens use any of the other ways above, or as stated here:

http://support.microsoft.com/kb/933179

Just do not use Drive:\boot\Bootsect.exe –NT60 All, replace All with the drive letter in question. MS really don't care if people are using other OS, the command with all switch will replace bootsectors on ALL partitions:

http://technet.microsoft.com/en-us/library/cc749177.aspx

Do all these procedures with USB disk removed.

edit: boot.ini and winnt.sif are not related. What unattended settings do you have? Some of the settings in [unattended] section will not be applied, depends. Anything else is fine. If you have something in [unattended] please post that part only.

Do not replace winnt.sif in ~BT folder, it has some critical entries added by the program. Edit it instead, but keep the changes the program made.

Edited by ilko_t
0

Share this post


Link to post
Share on other sites

What i mean to ask is, whether it will have an effect on installing XP on partition H and not C. I have never used unattended so thats why i am asking.

This is Winnt.sif from ~BT folder:


[Data]
AutoPartition=0
UnattendedInstall="Yes"
MsDosInitiated="1"
floppyless="1"
winntupgrade="no"
win9xupgrade="no"
EulaComplete="1"


[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
TimeZone=85
OEMSkipRegional=1
OemSkipWelcome=1

[Display]
BitsPerPel=32
Xresolution=1024
Yresolution=768

.....


[TapiLocation]
CountryCode=1

[RegionalSettings]
LanguageGroup=1
SystemLocale=00000409
UserLocale=00000409
InputLocale=0409:00000409

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

[GuiRunOnce]
"binifix4.cmd c:"
[SetupParams]
UserExecute="ren_fold.cmd"


This is Winnt.sif from ~LS folder:

[Data]
AutoPartition=0
UnattendedInstall="Yes"
MsDosInitiated=No

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
UnattendSwitch="yes"
WaitForReboot="No"
TargetPath=\WINDOWS
DriverSigningPolicy=Ignore
NonDriverSigningPolicy=Ignore
OemPreinstall=Yes

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
TimeZone=85
OEMSkipRegional=1
OemSkipWelcome=1

[Display]
BitsPerPel=32
Xresolution=1024
Yresolution=768

.....

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

Nope, where you setup Windows you set during Text mode. We need to know that in advance, because of the USB disk drives are "shifted" and resulting BOOT.INI from Windows setup is not proper. That's why we need to know in advance and create proper boot.ini in order to start GUI part of the setup and Windows for first time.

Remember to start from USB 3 times- Text mode, GUI mode and first start, when desktop is fully loaded you can unplug the stick.

edit: unless you have custom files/folders in $OEM$ to be copied you are fine. If you do have- then easiest way is to integrate BTS mass storage drivers pack to your source and redo the USB disk.

Here is why:

http://www.msfn.org/board/install-OEM-drivers-t123023.html

0.2 is almost ready, all this has been taken care of, beta testers are always welcome btw, just let me know if you can help :)

Edited by ilko_t
0

Share this post


Link to post
Share on other sites

Hmmm. When i select USB boot, it says there is some configuration problem and it cannot continue. EDIT: The file system i used for my USB was NTFS, is this why it gave me thi error?

And yes i do have extra files(setups) in the OEM folder. Can i try your 0.2 version. If it fixes all this then it can be good for testing.

Also here is my presetup.cmd if it matters. My actual USB drive letter right now in Vista is "I". So i dont know if it makes any difference when i run from USB.

REM +==========================================================================+
REM | |
REM | This presetup.cmd file was dynamically generated by the DriverPacks |
REM | BASE, to work with the DriverPacks without any further editing. |
REM | However, if you would like to add some custom functionality, you can |
REM | edit this file without any problems. Just take into record that this |
REM | file will be erased if you run the DriverPacks BASE on these Windows |
REM | installation files again! |
REM | |
REM | With special thanks to: |
REM | -Pyron, a06lp and iLE for their help with this method; |
REM | -schalti for the optional 'Keep the Drivers' system and Pyron (again) |
REM | for turning it into an executable. |
REM | -SuperTibaldoKart for creating un7zip.exe |
REM | |
REM +==========================================================================+


REM +==========================================================================+
REM | Finding CD/DVD driveletter. |
REM |--------------------------------------------------------------------------|
SET TAGFILE=\OEM
FOR %%i 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 "%%i:%TAGFILE%" SET CDDRIVE=%%i:


REM +==========================================================================+
REM | Decompressing the DriverPacks to the harddisk - using un7zip.exe. |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\un7zip.exe %CDDRIVE%\OEM\DRIVER.7z %SystemDrive%\


REM +==========================================================================+
REM | Copying/decompressing the files to finish the installation. |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\un7zip.exe %CDDRIVE%\OEM\bin\*.7z %SystemDrive%\
COPY /Y %CDDRIVE%\OEM\bin\DPsFnshr.ini %SystemDrive%\
IF EXIST %CDDRIVE%\OEM\*.ins COPY /Y %CDDRIVE%\OEM\*.ins %SystemDrive%\


REM +==========================================================================+
REM | Scanning for driverdirectories. |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\DevPath.exe %SystemDrive%\D


REM +==========================================================================+
REM | Disable Driver Signing Policy and keep it disabled. |
REM |--------------------------------------------------------------------------|
START %SystemDrive%\DSPdsblr.exe




REM ===========Added by WinSetupFromUSB============
IF EXIST %systemroot%\system32\setupold.exe DEL /F %systemroot%\system32\setupold.exe
IF EXIST %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$1\nul xcopy %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$1\*.* %systemdrive%\ /i /k /e /r /y /h
IF EXIST %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$$\nul xcopy %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$$\*.* %systemroot%\ /i /k /e /r /y /h
type %systemroot%\system32\tempunat.inf >> %systemroot%\system32\$winnt$.inf
REM ====================END=======================
EXIT

Edited by jaclaz
0

Share this post


Link to post
Share on other sites
Cool.

I was thinking of this: I will install XP on H and when install is complete and XP is working, i can restart and use Vista DVD to repair startup and then from Vista add an entry for XP using EasyBCD. Will this be allright?

EDIT: Forgot to ask: The XPSource has unattended settings in it, will it affect with the boot.ini settings i made and the winnt.sif settings. do i need to make changes to that to be safe?

I don't mean to overstep ilko_t (he truly is the authority on this subject), but there is another tool (program) out that works well with XP installs over Vista and it works from either on Vista or XP; 32 or 64 bit platforms.. It is called Vista Boot Pro and its free (only asks for donations). It has a BCD editor in it that works really well in most cases. I use it myself, cause I have a laptop that has Vista Ultimate as its native OS and I like running XP for some apps. So I install XP as a second OS and then run Vista Boot Pro (on XP) to repair the boot strap for Vista and add an entry in the BCD (with Vista Boot Pro) so that you have a choice of starting XP or Vista when your machine starts, thereby creating a dual boot configuration. It really makes things a lot easier.

Question: However I have a question regarding unattended installs, can the tool that is provided here allow unattended installs to run off the USB thumb drive? <EDIT> I see there is already an answer to my question before I had it typed. ;) How soon would beta 0.2 be available to test? If it would be possible, I would like to be one of those testers.

I must admit I have only glanced through the past two years of messages on this forum and I have to say that I have been really impressed with the amount of time of devotion and achievement that has been made for this project. I was beginning to think there wasn't anything out that allowed XP to install from a USB device. Truly remarkable! My hat goes off to all those who have contributed to such a cause. :thumbup

Edited by Macster
0

Share this post


Link to post
Share on other sites

@thegr8anand- since you have BTS driver packs integrated you are fine about the unattended part. Lets fix the boot.

Can you give some more details about the error message?

My guess is that you started from USB and you got that message, which means grub4dos was not installed properly on the USB bootsector.

Can you go in \WinSetupFromUSB\files\grub4dos\ and launch grubinst_gui.exe giving it admin rights.

Select radio button DISK and select your USB disk. Be careful which one you select. Use disk sizes as a clue, just in case.

Then click refresh button next to PART LIST and select from the drop-down menu the partition on the USB disk.

Select Verbose output and click INSTALL.

If you see that it successfully installed, try to boot again from the USB disk. If not- please make a screenshot or post what it says.

@Macster- thanks : )

I should be ready with next version in a few days, most of the new stuff is about unattended install. Started using the same approach as BTS team is using (fake Setup.exe) and presetup.cmd to carry out whatever could be done for the unattended section.

However, there is quick and dirty workaround- the problem with unattended section is that if it's present, even if empty, Text part of setup doesn't ask where to install windows to and puts it on the USB drive, where ~BT and ~LS folders are.

Well, it won't if you create a few big dummy files, making the disk space less than the one stated in txtsetup.sif ~1.1GB on unmodified XP.

Now you can safely put back unattended section in winnt.sif and start setup- it will try to install there, say that it can't and go back to the disk list ;)

fsutil file createnew U:\dummy1.temp 1000000000

This makes setup 1:1 as from a CD, regarding contents.

I was thinking to use this approach, it eliminates all the mess with unattended section, but if one is with a USB hard disk or 16GB stick it's not practical to occupy all the free space.

Edited by ilko_t
0

Share this post


Link to post
Share on other sites

Ok. It is working right now. Actually the problem was NTFS file system. I guess my comp had a problem with it. I changed it to FAT32 and ran your program again and now it is working. I am on my other PC and it is installing right now. Seems slow though from USB. At first setup it gave me 2 options: First part of Windows XP Setup or Second part Of XP setup. I didnt know what to choose so i went with the first one. I dont know if it should have asked that.

Also i am not sure if it will install all the extra apps and drivers that were on the CD and the tweaks and removals that were put using nlite.

0

Share this post


Link to post
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.