MSFN Forum: How to boot/install from USB key ? - MSFN Forum

Jump to content



  • 25 Pages +
  • « First
  • 21
  • 22
  • 23
  • 24
  • 25
  • You cannot start a new topic
  • This topic is locked

How to boot/install from USB key ? - the historical thread - how it all began

#438 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 01 December 2007 - 01:21 PM

The Batch Program usb_prep8.cmd can be used
to make Bootable USB-stick or USB-Harddisk for Install of Windows XP.

Important Changes in usb_prep8.cmd Batch Program:

The code of BT_folder.cmd program for making Windows XP Setup Bootfolder $WIN_NT$.~BT
by Parsing DOSNET.INF was added to the usb_prep8.cmd program,
so that launching of winnt32.exe /noreboot .... can be avoided and is no longer needed. :)

A Custom winnt.sif file in the usb_prep folder is needed now,
which will be copied by the usb_prep8.cmd program to the $WIN_NT$.~BT Bootfolder.

For UNATTENDED Install make Changes in usb_prep folder:
Change Product Key in winnt.sif and winnt_dp.sif and Change $OEM$ folder to your needs.
Use for Preparing USB-Drive Only winnt.sif file without an [Unattended] Section.
Don't change commands for using BTS DriverPacks.
winnt_dp.sif is used by usb_prep.cmd when using XPSOURCE with DriverPacks Integrated.

It is not needed anymore to Set the Drive Letter for the Virtual TempDrive,
since there is used now an Automatic Preset Value (mostly Drive T: is used).

VBScript was used for making GUI enhancements for the usb_prep8.cmd Batch Program.

When a .vbs script file is executed by cscript.exe from a Command Window,
then the wscript.echo of VBScript is send as output of cscript to that Command Window
instead of giving for the wscript.echo a GUI pop-up.

When a .vbs script is executed by doubleclick then a wscript.echo statement
is giving as you can try just only a GUI pop-up message with the echo of the return value
e.g. displaying the return value of a VBScipt Function.

The return value of the VBScript Function given as output of cscript to the Command Window,
can be evaluated by using the FOR /F command according to

FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo u_script\FolderSel.vbs') DO SET src_ok=%%A


This mechanism enables the possibility to use GUI enhancements in a CMD Batch Program. :)

Rob van der Woude gives very valuable information on this subject.
SEE: http://www.robvander...ermessages.html
And a lot of handy Windows Script Host Examples, among which BrFolder.vbs implemented as FolderSel.vbs
http://www.robvander...amples_b.html#B

MsgBox References:
http://www.w3schools...func_msgbox.asp
http://msdn2.microso...y/sfw6660x.aspx

The Wizard's Apprentice as proposed by jaclaz,
can provide also GUI enhancements in a Batch Program,
but that would require an additional download, since adding the 82 kB of this program
would make the usb_prep.zip file larger than the 200 kB Upload limit of MSFN.

So I decided to use a similar but integrated solution using cscript.exe with VBScript files,
which has the advantage that it requires only a very small amount of extra code in the Batch Program.

The usb_prep8.cmd program is given in the Attachment as usb_prep8.zip file :)

Regards,

wimb

Edit 4dec7: Small changes in usb_prep8.zip Attachment: mainly MsgBox icons and Help_usb_prep.txt file

Attached File(s)


This post has been edited by wimb: 04 December 2007 - 02:46 AM



#439 User is offline   steffabc 

  • Group: Members
  • Posts: 1
  • Joined: 10-November 07

Posted 02 December 2007 - 06:29 AM

thank you
tried it and works fine

#440 User is offline   Locaj 

  • Group: Members
  • Posts: 5
  • Joined: 09-December 07

Posted 13 December 2007 - 03:07 PM

Hiya

Got problem when trying to install... I run TXT mode and it loads up all drivers... at some point at very end of "first" txt mode it says on the bottom bar "Preparing to run Windows...." NOW i have blue screen. No folders on drive C: was created, no folders on USB drive created aswell... I cant see screen when you press Enter and than f8.

Ive seen taht usb_prep8 takes ntldr and other files from C: is it possible that it might be fault o my C: files?
Other thing is that my usb is seen as fixed not removable. So when PEtoUSB loads i need to chage category to fixed.

Got 3 partitions c-ntfs d-fat e-ntfs f-cd g-usbfixed. Should all be same? Should i combine them all to one partition?
Im lost i tried few times. Is there way ti change my usb to removable instead fixed?

Many thanks
Kind regards
Locaj

#441 User is offline   ilko_t 

  • MSFN Expert
  • Group: Super Moderator
  • Posts: 1,414
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 13 December 2007 - 05:30 PM

Hi Locaj,

If I understood you correctly I see 2 problems:
1. BSOD
2. Your stick seen as fixed

To resolve them:
1. What hardware you are booting on? Dell?
Try to overwrite on stick ntdetect.com with Dietmar's modified ntdetect.com. Details here:
http://www.911cd.net...showtopic=14181

2. Did you try in usb_prep.cmd changing USB drive type to USB hard drive? Please try so, I think it was option 0.

Few other questions-
3. What is the windows version you are installing, is it customized?
4. Did you insert custom mass storage drivers?
5. What do you mean here-

Quote

Got 3 partitions c-ntfs d-fat e-ntfs f-cd g-usbfixed. Should all be same?


Quote

Is there way ti change my usb to removable instead fixed?
You should provide details about your stick model etc. Some manufacturers have utilities for that purpose, did you have a look at it's web site? jaclaz may help you more on this question.

@wimb- nice work :)
I haven't tested latest batch, no spare time at all, just a quick question which bothers me- are we sure there are not "not documented" actions from winnt32.exe? In case of such it would be tricky to replicate it's behavior. You say the problem with winnt32 is that it deletes any $win_nt$... folders, I think for regular user that shouldn't be a problem. How many have those folders on their hard drives? If they have it intentionally, probably deletion of such wouldn't bother them much, warning should be enough. Just my opinion.
Thanks again for your time and enthusiasm :)

Regards,
ilko

This post has been edited by ilko_t: 13 December 2007 - 05:31 PM


#442 User is offline   liuzhigao 

  • Newbie
  • Group: Members
  • Posts: 17
  • Joined: 13-December 07

Posted 14 December 2007 - 08:26 AM

Now WINPE is very good.
this problem should can slove

#443 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 14 December 2007 - 11:28 PM

View Postilko_t, on Dec 14 2007, 12:30 AM, said:

@wimb- nice work :)
I haven't tested latest batch, no spare time at all, just a quick question which bothers me- are we sure there are not "not documented" actions from winnt32.exe? In case of such it would be tricky to replicate it's behavior. You say the problem with winnt32 is that it deletes any $win_nt$... folders, I think for regular user that shouldn't be a problem. How many have those folders on their hard drives? If they have it intentionally, probably deletion of such wouldn't bother them much, warning should be enough. Just my opinion.
Thanks again for your time and enthusiasm :)

Regards,
ilko

The code of BT_folder.cmd program for making Windows XP Setup Bootfolder $WIN_NT$.~BT
by Parsing DOSNET.INF , which was added to the usb_prep8.cmd program,
so that launching of winnt32.exe /noreboot .... can be avoided, makes the program much simpler and more direct.
It was tested several times and as far as I see there are no problems using it.

When a Bootable USB-harddisk with XP Install files is connected and at the same time an USB-stick is prepared,
then winnt32.exe would give unwanted effects, when it deletes $WIN_NT$.~LS folder of USB-harddisk.
So I see only advantages in not using winnt32.exe anymore in preparing the $WIN_NT$.... Folders.

Windows XP PowerPacker of Siginet is also using Parsing of DOSNET.INF instead of launching winnt32.exe
for making the $WIN_NT.~BT XP BootFolder. So in my opinion everything is save and even saver as before.

@Locaj
Your USB-stick is seen as Fixed instead of Removable, that might be the cause of your problem.
What is the size and the make of the stick ?
You can try to use Option 0) Change Type of USB-Drive, and use USB-Harddisk as Setting for a Fixed Device,
so that rdummy.sys makes USB Fixed Device being seen as Removable in Windows XP Setup.

Regards,

wimb

#444 User is offline   Locaj 

  • Group: Members
  • Posts: 5
  • Joined: 09-December 07

Posted 15 December 2007 - 08:46 PM

Hiya

Thanks... I will try ntdetect.com. Will try to chage type to 0.

Im trying defoult english windows xp sp2 from oryginal cd =-].
I dont have any custom mass stroge drivers... WinXp automaticly detect and install it.
I meant i got 3 partitions... Disk C: which is NTFS. Next is D: and its Fat32 and E: NTFS. So maybe its problem that i have few different partitions.

My usb is complete noname. I cant even take the cover off to look at chips. Its glued and very hard to take off. Tried few times... only way is to crush the cover totaly ...

So rdummy.sys will make my usb seen as removable? So prep8 can do it right?
But it will be only short time coz after reinstall winXP will detect as fixed... something like that ?

Many Thanks
Locaj

This post has been edited by Locaj: 15 December 2007 - 08:50 PM


#445 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 8,796
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 16 December 2007 - 02:33 AM

View PostLocaj, on Dec 16 2007, 03:46 AM, said:

My usb is complete noname. I cant even take the cover off to look at chips. Its glued and very hard to take off. Tried few times... only way is to crush the cover totaly ...


Well, the idea is to find the VID and PID of the device via SOFTWARE, without being cruel to the poor little thing....;)

See these:
http://www.911cd.net...showtopic=15776
http://www.boot-land...?showtopic=1659

jaclaz

#446 User is offline   Locaj 

  • Group: Members
  • Posts: 5
  • Joined: 09-December 07

Posted 16 December 2007 - 12:31 PM

Hiya

Ive just changed Fixed to Removablo with this utility

http://www.911cd.net/forums//index.php?showtopic=15923


So easy...
Now it should bo all right ? =-]

#447 User is offline   HostFat 

  • Group: Members
  • Posts: 2
  • Joined: 20-December 07

Posted 20 December 2007 - 07:02 AM

usb_prep8.cmd doesn't support x64 because Virtual Disk Driver doesn't support it :(

#448 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 20 December 2007 - 12:25 PM

View PostHostFat, on Dec 20 2007, 02:02 PM, said:

usb_prep8.cmd doesn't support x64 because Virtual Disk Driver doesn't support it :(
That's a pity. I did not know, thanks for the Info.

By the way, it would not be so difficult to change the program such that the content for the USB-drive is written first to a harddisk folder or direct to the USB-drive, instead of using the Virtual tmpdrive.

Regards,

wimb

#449 User is offline   pucelle 

  • Group: Members
  • Posts: 5
  • Joined: 26-December 07

Posted 27 December 2007 - 08:54 AM

So I tried this and I'm getting the following error message:
"The specified Setup script file (C:\XPSOURCE\i386\winnt.sif) is inaccessible or invalid. Contact your system administrator."

I have no idea why I'm getting this message. Then when I hit ok, I get Making of LocalSource folder $WIN_NT$.~LS Ready Press any key to continue... Copying custom files to temp drive.... The system cannot find the path specified. It then takes forever to CRTL+C out before getting :

Does T:\$WIN_NT$.~LS\I386 specify a file name or directory name on the target (F = file, D = directory)?

C:migrate.inf 1 file copied
same question as above

more files are copied and then I get an error message about not being able to read/edit the tstsetup.sif file.

I checked the names, locations, cases, & attributes on said files, what else am I missing?

#450 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 8,796
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 27 December 2007 - 10:23 AM

View Postpucelle, on Dec 27 2007, 03:54 PM, said:

I checked the names, locations, cases, & attributes on said files, what else am I missing?

Maybe the SOURCE files are in some way nonstandard.

I mean whence they come from?

An OEM release (DELL,HP, etc.)?

Have they been modified in some way (slipstreaming, nlite, HFSLIP, etc.) ?

Most probably it's the first error (WINNT.SIF error) that triggers a chain of errors. :unsure:

jaclaz

#451 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 28 December 2007 - 11:48 AM

View Postpucelle, on Dec 27 2007, 03:54 PM, said:

"The specified Setup script file (C:\XPSOURCE\i386\winnt.sif) is inaccessible or invalid. Contact your system administrator."

It might be that your winnt.sif file is causing the error. Check this file in Notepad Editor.
You used usb_prep6.cmd where you had to give and change the product key in the given winnt_sif.txt file
and copy this file as winnt.sif in your XPSOURCE\i386 folder.

There is a newer version of the program named usb_prep8.cmd which makes the XP Bootfolder quite differently,
without running winnt32.exe . It might well be that in this case you don't have your problem.
In this case the given winnt.sif file needs to remain located in the usb_prep8 folder.
The winnt.sif file provides the answers needed for Unattended Install of Windows XP and needs your Product Key !
Did you try to use usb_prep8.cmd ?

Regards,

wimb

#452 User is offline   pucelle 

  • Group: Members
  • Posts: 5
  • Joined: 26-December 07

Posted 01 January 2008 - 12:01 AM

I'm pretty certain I'm using version 8 as I had downloaded it based off the link in wimb's sig. I am using an OEM {Dell} xp s2 source and a customized winnt.sif that I made using a combination of nlite & my knowledge of the available options/commands in said file. I didn't use the nlite created nor the usb_prep ones, I just cut & paste as well as compared versions for things I was missing.

I wasn't sure where I was supposed to put the drivers so I put them in both places (the usb_prep $oem folder & the one in the XPSource\$oem folder). But I didn' t get that far in the installation. Sorry it took so long to reply but until I can get a "stable" copy of XP running I don't exactly have a working PC at work.

I reimaged my machine but the image we have is bad so I still need to figure out how to get this to work as I need to create a new image as well.

Oh, I also slipstreamed the recent updates into the OEM folders as there are like 60 of them for the version I have.

Thanks & Happy New Year (Joyeux Noel & Prospero Ano)!

This post has been edited by pucelle: 01 January 2008 - 12:02 AM


#453 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 01 January 2008 - 01:49 AM

View Postpucelle, on Jan 1 2008, 07:01 AM, said:

I'm pretty certain I'm using version 8 as I had downloaded it based off the link in wimb's sig. I am using an OEM {Dell} xp s2 source and a customized winnt.sif that I made using a combination of nlite & my knowledge of the available options/commands in said file. I didn't use the nlite created nor the usb_prep ones, I just cut & paste as well as compared versions for things I was missing.

In your Private communication you were speaking of errors when using usb_prep6.cmd
So I supposed that you did not use version 8, but it is clear now that you did use version 8

Can you post your winnt.sif file (after wiping the product key) ?
Where did you put your winnt.sif file ?
And what did you do with the well working winnt.sif file provided in the usb_prep8 folder ?

It is worthwhile to try the winnt.sif file provided in the usb_prep8 folder
and keep it there and change only the product key.
And I prefer not to use nLite.

Try first usb_prep8.cmd on a clean xp sp2 source and if successfull
then use RyanVM Integrator for integrating post-sp2 Update Pack, IE7 and WM11 Addon
and after that use DPs_Base for integrating only DriverPack Mass Storage with text mode enabled.
Everything is described in the provided Help_usb_prep.txt file, see section D.

Regards,

wimb

This post has been edited by wimb: 01 January 2008 - 02:00 AM


#454 User is offline   ilko_t 

  • MSFN Expert
  • Group: Super Moderator
  • Posts: 1,414
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 01 January 2008 - 02:41 PM

Happy New Year everyone :D

@pucelle- your information is confusing :unsure:

View Postpucelle, on Dec 27 2007, 03:54 PM, said:

So I tried this and I'm getting the following error message:
"The specified Setup script file (C:\XPSOURCE\i386\winnt.sif) is inaccessible or invalid. Contact your system administrator."

I have no idea why I'm getting this message. Then when I hit ok, I get Making of LocalSource folder $WIN_NT$.~LS Ready Press any key to continue... Copying custom files to temp drive.... The system cannot find the path specified. It then takes forever to CRTL+C out before getting :

Does T:\$WIN_NT$.~LS\I386 specify a file name or directory name on the target (F = file, D = directory)?

C:migrate.inf 1 file copied
same question as above

more files are copied and then I get an error message about not being able to read/edit the tstsetup.sif file.

I checked the names, locations, cases, & attributes on said files, what else am I missing?
The above message indicates that there is something wrong within your winnt.sif, look here:
http://support.microsoft.com/kb/247882

At the same time you said that you used USB_Prep8, which doesn't use winnt32.exe parsing winnt.sif. In version 8 winnt.sif is simply copied, in all previous versions it's parsed by winnt32.exe.
The rest of your errors are because winnt32.exe didn't complete it's job creating ~BT and ~LS folders from your source.


View Postpucelle, on Jan 1 2008, 07:01 AM, said:

I'm pretty certain I'm using version 8 ....


Regards,
ilko


edit:
wimb, may be you should remove the check for winnt32.exe in source and check for some other file(s), since it's no longer used and there are people, which remove this functionality from their source.
if exist %src_ok%\i386\winnt32.exe (
		SET xpsource=%src_ok%
) else (
	echo.
	echo  Error: The path %src_ok% does not contain Windows XP Source Files


Another idea is not to use tmpdrive and vdk anymore, either copy to a temporary folder or right to the USB destination, this will simplify the procedure and give x64 compatibility.

Just a quick remind to anyone with 64bits source and USB hard disk- rdummy.sys won't work on 64 bit windows. If there are requests for it I will compile it for x64 too.

This post has been edited by ilko_t: 01 January 2008 - 02:52 PM


#455 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 569
  • Joined: 21-March 07

Posted 02 January 2008 - 02:18 AM

View Postilko_t, on Jan 1 2008, 09:41 PM, said:

Happy New Year everyone :D

wimb, may be you should remove the check for winnt32.exe in source and check for some other file(s), since it's no longer used and there are people, which remove this functionality from their source.
if exist %src_ok%\i386\winnt32.exe (
		SET xpsource=%src_ok%
) else (
	echo.
	echo  Error: The path %src_ok% does not contain Windows XP Source Files


Another idea is not to use tmpdrive and vdk anymore, either copy to a temporary folder or right to the USB destination, this will simplify the procedure and give x64 compatibility.

Just a quick remind to anyone with 64bits source and USB hard disk- rdummy.sys won't work on 64 bit windows. If there are requests for it I will compile it for x64 too.

I will change the program such that dosnet.inf file is used as a marker to indicate a valid xp source directory.
It is a very good idea to change that since winnt32.exe is no longer used.

At the moment I am working on integrating USB_MultiBoot.cmd in usb_prep8.cmd.
In the new concept I removed already the use of a Virtual tmpdrive,
since it is no longer needed and gives problems with x64 versions of XP.

I am very interested in rdummy.sys version for 64 bit windows,
so that we can use this in the usb_prep8.cmd program and so improve the compatibility.
It would be very helpfull ilko_t if you can make that, because I have no experience about this subject.

@ilko_t
I thank you very much for your pioneering effort in this project and for your helpfull comments. :)

Cheers,

wimb

This post has been edited by wimb: 02 January 2008 - 02:22 AM


#456 User is offline   Sancho 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 16-June 07

Posted 07 January 2008 - 10:47 PM

Why is the virtual drive even used and how is it being made? Funny enough, before seeing the tempdrive made, I made my own temp drive with the Windows source files in it so there wouldn't be spaces in the name. I think I saw that vdk.exe is being used, but why do this? I just put "subst O: C:\[xp files source]" for mine. Is it not different somehow?

#457 User is offline   ilko_t 

  • MSFN Expert
  • Group: Super Moderator
  • Posts: 1,414
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 07 January 2008 - 11:00 PM

In first scripts winnt32.exe was used, will it like subst? If yes- good idea, where were you a few months ago ? ;) Why virtual drive was used- post #295 and the next few.
Anyway, winnt32.exe is no longer used and virtual drive will not be used in next versions.

About rdummy.sys- I hoped for a simple recompiling, but that was no go, the code must be rewritten/changed, so we need a proper programmer to do this. I have something in mind, but am not sure at all whether I can get him to do that.

This post has been edited by ilko_t: 07 January 2008 - 11:01 PM


Share this topic:


  • 25 Pages +
  • « First
  • 21
  • 22
  • 23
  • 24
  • 25
  • You cannot start a new topic
  • This topic is locked

5 User(s) are reading this topic
0 members, 5 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy