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

Jump to content


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

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

#421 User is offline   tonich 

  • Newbie
  • Group: Members
  • Posts: 33
  • Joined: 21-September 06

Posted 29 October 2007 - 10:26 AM

Good going, ilko! :thumbup
Keep on the great work!


#422 User is offline   ilko_t 

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

Posted 03 November 2007 - 05:55 PM

Hi all,

Sorry about the delay, lack of spare time lately.

Here is what has to be added to usbprep.cmd to add rdummy driver.


ECHO Adding lines to TXTSETUP.SIF ....
.............
REM added for USB hard drives, loads rdummy.sys during Text Setup, which makes usbstor to see USB drives as removable
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy.sys = 1,,,,,,4_,4,1,,,1,4" -s SourceDisksFiles
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy = rdummy.sys,4" -s SCSI.Load
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy = \"USB hard disk as removable\"" -s SCSI
fedit -f %tmpdrive%\$WIN_NT$.~BT\winnt.sif -add -create -l "\"sc config rdummy start= disabled"" -s GuiRunOnce
copy rdummy.sy_ %tmpdrive%\$WIN_NT$.~LS\I386
copy rdummy.sy_ %tmpdrive%\$WIN_NT$.~BT


rdummy.sy_ and it's source code are in the attachment.
Installation tested with XP SP2 source, 80GB IDE HD, generic IDE-USB adapter. Drive formated FAT16x with 1.9GB partition using PEtoUSB. XP built-in format didn't make it bootable.
On first GUI logon rdummy service is disabled, on next reboot it'll be inactive. If one needs to reenable it simply change startup type in services to 0, or use "sc config rdummy start= boot".

WARNING!!!
There is no warranty whatsoever for this driver and it's behavior, use it COMPLETELY at your own risk.
The only issue I've seen by now is BSOD 7B when F3 is pressed to quit from Setup, but there may be others. Not tested with 2K/2K3.


@wimb
- would you add this as an option, the same way we choose source path etc. I didn't want to mess with the batch file.

A few minor suggestions for usbprep.cmd-

1. boot.ini options on stick could be easier to be like:
[Boot Loader]
Timeout=10
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Steps 2 and 3- GUI Mode Setup and first start " /FASTDETECT
C:\SETUPLDR.bs="Step1- TEXT Mode Setup (Don't unplug USB drive until after first GUI logon)"


2. For the usbprep.cmd options- I'd rather "dumb" copy all files and folders from source\I386 to ~LS\I386 skipping existing files, instead of having option 0. This doesn't add too much space, USB sticks are bigger and if one would like smaller source, he would do that in advance. It's also safer.

@all- Question- xcopy /d would copy non-existing files to target, I read that if files are NOT newer than 1 day they'd not be copied, is that right? What would happen if one makes a new XP source today, NLite it and use xcopy /D ?

Quote

/D:mm-dd-yyyy
Copy files that have changed since mm-dd-yyyy.
If no date is given, the default is to copy
files with a modification date before today.
(at least 1 day before)
http://www.ss64.com/nt/xcopy.html

3. Boot.ini on target drive- the second entry is "USB Repair Microsoft Windows XP Professional", may be is good idea to add "do NOT use to start", or something similar.

4. Option to delete tempimage.img could be nice after unmounting virtual drive.

What do you guys think?

@jaclaz- I wanted to boot from mapped by Grub4Dos floppy image, containing all boot files. Setup keeps looking for bioinfo.sif in ~BT folder. That means for me it does not recognize the mounted floppy as such, but rather as a hard drive.
Then I saw cdob posted some results trying to achieve the same goal, post #189. I am curious if boot files when he was getting BSOD 7B were in ~BT folder or in root. I couldn't go that far when files are in root. For now I'd rather not play again after reading his results.

@tonich-Thanks, nice to see you around.

View Posttonich, on Oct 29 2007, 05:26 PM, said:

Good going, ilko! :thumbup
Keep on the great work!
This above applies for all in here :)

regards,
ilko

Attached File(s)



#423 User is offline   wimb 

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

Posted 04 November 2007 - 05:06 AM

View Postilko_t, on Nov 4 2007, 12:55 AM, said:


@wimb
- would you add this as an option, the same way we choose source path etc. I didn't want to mess with the batch file.

@ilko_t
I will add to usb_prep.cmd the possibility to use rdummy.sys for Install of Windows XP from USB-IDE Harddisk,
in the way as given by you.
It will take some time, since I like also to test the usb_prep.cmd program with such USB-IDE Harddisk.
I have a 20 GB IDE Harddisk available for testing purposes,
but must first get a suitable USB-IDE HDD case for that.

Quote

A few minor suggestions for usbprep.cmd-

1. boot.ini options on stick could be easier to be like:
.....
2. For the usbprep.cmd options- I'd rather "dumb" copy all files and folders from source\I386 to ~LS\I386 skipping existing files, instead of having option 0. This doesn't add too much space, USB sticks are bigger and if one would like smaller source, he would do that in advance. It's also safer.

3. Boot.ini on target drive- the second entry is "USB Repair Microsoft Windows XP Professional", may be is good idea to add "do NOT use to start", or something similar.

4. Option to delete tempimage.img could be nice after unmounting virtual drive.

I can make some minor changes to boot.ini, but it is also important that the numbering of options will fit easily and logically in the boot.ini for the MultiBoot Menu as described in my Guide.

The idea to copy in any case all files and folders from source\I386 to ~LS\I386 is a very good idea.
It is simpler, does not take to much space and moreover the USB-stick XP-source is always more complete.

I will also change boot.ini such that "USB Repair......" option is clearly not meant to be used as Start option,
allthough this choice would not be harmfull.

I think that Delete and Renaming of tempimage.img is easier and better done with the Windows Explorer FileManager.
Quite often instead of Delete, one would like to Rename tempimage.img for future use.
And if not Renamed, than the choice to Delete tempimage.img is offered
on next running of the usb_prep.cmd Batch Program.

Greetings,

wimb

This post has been edited by wimb: 04 November 2007 - 07:25 AM


#424 User is offline   wimb 

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

Posted 09 November 2007 - 02:57 AM

The usb_prep.cmd Batch Program was changed so that it can be used also
for preparing the LocalSource for Install of Windows XP from USB-Harddisk using rdummy.sys
as developed by ilko_t see: http://www.msfn.org/board/index.php?showto...1384&st=421 :thumbup

FOR USB-Harddisk make 1900 MB FAT Partition at beginning of the USB-Harddisk.
Use FAT Format and Set Active OR use PeToUSB to Format such partition.
rdummy.sys makes Fixed USB-Harddisk seen in XP Setup as Removable Device.
XP FAT Format is OK but without Set Active of partition you will get DISK BOOT FAILURE.

USB-Harddisk will get during XP Setup DriveLetter D: and migrate.inf cannot change that.
After First Logon there is only 1 USB-Harddisk partition visible as Removable Drive.
After XP Setup and Reboot for second Logon than
all partitions of USB-Harddisk will become visible as Fixed Local Drives
and the highest partition number of USB-Harddisk will get DriveLetter D:
This reversal and use of DriveLetters might be unwanted and consequently
the use of USB-stick for XP Setup is Preferred, so that this DriveLetter Problem does not occur :)

***** WARNING ***** :ph34r:
HP USB Disk Storage Format Tool 2.0.6 Destroys Partition Table of USB-Harddisk and
cannot be used to Format one single partition of USB-Harddisk.
Using HP Tool makes Data partitions of USB-Harddisk inaccessible !! :angry:
So don't use HP USB Disk Storage Format Tool to Format USB-Harddisk.
The HP Tool is usefull to Format USB-sticks, especially to make a MS-DOS Bootable USB-stick.


Using PeToUSB.exe is SAFE for USB-Harddisk, it can only Format partitions with size less than 2 GB
without destroying the existing partition table, so that Data partitions are still accessible.

Use of usb_prep7.cmd and everything in the Help guides is COMPLETELY at your own risk.

ALL files of cmpnents and i386 folder of XPSOURCE are copied now to $WIN_NT$.~LS LocalSource folder.

XPSOURCE Space Saving Tips see: http://unattended.ms...xp/view/web/57/
You can Safely Remove in advance the following XPSOURCE folders:
WIN9XMIG, WIN9XUPG and WINNTUPG - This will free up 37.6 MB
LANG - 99 MB and cmpnents - 22.6 MB ( Needed for Tablet PC only )

undoren.cmd and ren_fold.cmd and Customized presetup.cmd for BTS DriverPacks:
First Limited Drive Range for searching TAGFILE is used
to Prevent Windows No Drive Alert due to Cardreader.
For case of Repair Install from USB-Harddisk with Shifted DriveLetters, than Drive with TAGFILE is not found.
In that case Full DriveRange is used for finding TAGFILE.
On Windows XP Repair Setup we get than: No Drive Alert - Press 4x Continue for Cardreader Drives

I did not observe any problem (BSOD) using F3 to Quit from XP Setup,
direct after Delete and Create of Partitions.
Quit with F3 Enables Rebooting a Second time in TXT Mode of XP Setup,
which is necessary after Repartitioning to give DriveLetters their Correct Value.

The Attachment gives the usb_prep7.zip file. GOOD LUCK ! :)

The usb_prep7.cmd Batch Program was tested for Fresh and Repair Install both from USB-stick and
two different USB-Harddisks using a Laptop and a Desktop computer.
Only in the case of Repair Install of Windows XP from USB-Harddisk there are Windows NO Drive Alerts
to be expected due to Cardreaders, which require 4x mouseclick on Continue Button.

Regards,

wimb

Attached File(s)


This post has been edited by wimb: 11 November 2007 - 11:22 AM


#425 User is offline   ilko_t 

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

Posted 09 November 2007 - 01:13 PM

:thumbup

Glad it worked, I gonna have a beer for it tonight :)

Anyone thinking of GUI ? :rolleyes:

Regards,
ilko

#426 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 12 November 2007 - 03:04 PM

Microsft Deploy let's you install windows xp / vista / server 2008 from a flash drive.

-gosh

#427 User is offline   wimb 

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

Posted 14 November 2007 - 01:19 AM

View Postilko_t, on Nov 9 2007, 08:13 PM, said:

Anyone thinking of GUI ? :rolleyes:

May be Siginet can make a GUI for the usb_prep7.cmd Batch Program,
such that it will fit in the family of RyanVM Integrator and Windows XP PowerPacker.
http://www.siginetsoftware.com/forum/

Regards,

wimb

This post has been edited by wimb: 14 November 2007 - 01:38 AM


#428 User is offline   wimb 

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

Posted 14 November 2007 - 12:11 PM

View Postgosh, on Nov 12 2007, 10:04 PM, said:

Microsft Deploy let's you install windows xp / vista / server 2008 from a flash drive.

-gosh

Is it in this case possible to use the flash drive repeatedly to make a hardware independent fresh install on different computers ? Or is it necessary to prepare the USB-stick each time for the next install ?

Can you give some more help on how to use this approach for Install of Windows XP from USB flash drive
and do you have a download link for the specific files that you use.
I would like to try the procedure that you propose.

Regards,

wimb

This post has been edited by wimb: 14 November 2007 - 12:14 PM


#429 User is offline   gosh 

  • gosh 2.0
  • Group: Patrons
  • Posts: 2,347
  • Joined: 03-October 03
  • OS:none specified
  • Country: Country Flag

Posted 14 November 2007 - 12:46 PM

download microsoft deploy from the microsoft download center. I installed it and used it to do an unattended install of xp sp2 from a 1 gig flash drive. MS Deploy let's you add your own apps and hotfixes and custom settings. I only did a basic install to test functionality.

-gosh

#430 User is offline   ilko_t 

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

Posted 14 November 2007 - 01:04 PM

View Postgosh, on Nov 12 2007, 10:04 PM, said:

Microsft Deploy let's you install windows xp / vista / server 2008 from a flash drive.

-gosh
Thanks for that, please enlighten us some more :)

As far as I saw it, MS prepares WinPE with the setup source you provide. This WinPE could be booted from USB media, CD or whatever. Or did I miss something?
Unfortunately my fresh installation of Microsoft Deployment keeps freezing when building WinPE ISO, so I couldn't dig much.

@wimb I think you are going to need this:
Microsoft Deployment:
http://download.microsoft.com/download/b/3...Toolkit_x86.msi

It may download the necessary components for you, or get WAIK from here (992.2 MB :w00t: ), extract image and place WAIK MSI and WinPE.zip in the temporary folder, which will be created when you start download via Microsoft Deployment in \program files....

http://www.microsoft.com/downloads/info.as...5-LRMAIK_EN.img

Quoting file names by memory, installation is in my home PC, if you have troubles I can post exact names and paths.

This post has been edited by ilko_t: 14 November 2007 - 01:07 PM


#431 User is offline   wimb 

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

Posted 15 November 2007 - 10:39 AM

View Postilko_t, on Nov 14 2007, 08:04 PM, said:

@wimb I think you are going to need this:
Microsoft Deployment:
http://download.microsoft.com/download/b/3...Toolkit_x86.msi
get WAIK from here (992.2 MB),
http://www.microsoft.com/downloads/info.as...5-LRMAIK_EN.img

@ilko_t
Thanks for the download link for Microsoft Deployment Toolkit :)

The Results of my first experience with Microsoft Deployment is given below:

You might also need to install additionally:
Microsoft Management Console 3.0 for Windows XP (KB907265) and .NET 2.0
The WAIK .img file was mounted as .iso using DaemonTools, and then Installed using STARTCD.EXE
Then Microsoft Deployment Toolkit was installed.
After Launching the Deployment Workbench, I followed the Information Center > Getting Started Info
After Update Deployment Point, the folder Media\Content was copied to USB-stick.
The USB-stick was previously formatted with PeToUSB and was given a BOOTMGR type Bootsector using:

Open CMD Window and use bootsect.exe to change the bootsector for use with bootmgr

bootsect.exe /nt60 R:

where R: is your USB-stick drive.

In this way I could boot from USB-stick with Windows PE 2.0
After Auto Partitioning and Format, the $ LocalSource folders are generated on Harddisk.
After Restart you have to boot from Harddisk, otherwise only PE is launched.
So instead of Rebooting Windows PE, I shutdown the computer and removed the stick.
Then start the computer without stick and Install of XP Runs as usual,
except for a STOP Alert for giving Administrator Password, which can easily be avoided.
At Windows Logon the stick was asked to be plugged in again to Finish Install.

Well it worked, but the result was UNWANTED and in a way unexpected.

The XP Install claimed the whole disk of my testcomputer for making a new partition.
This means the Partition Table was gone and my 2 Data partitons were inaccessible :angry:
Moreover the disc geometry was quite different from the usual one. :wacko:
The Drive C Bootsector is now sector 2048 (0x800) instead of normally 63 (0x3F) :ph34r:
In CHS terms sector 2048 corresponds to CHS 0 32 33, which is not a head boundary,
whereas sector 63 corresponds to CHS 0 1 1 and the MBR is at sector 0 = CHS 0 0 1
The result is that Partition Magic and Partition Info give a lot of Error Messages and are useless.

Luckily I had a backup of the original MBR with the correct Partition Table,
and the mirror MFT of the new partition was made well below the beginning of my original second partition.
Restoring the original MBR with TinyHexer and then booting with Ghost for System Restore was applied.
After again Rebooting I was able to access my 2 lost DATA partitions :)

This method of XP Install from USB-stick takes at least 10-20 minutes extra time
for booting with Windows PE and making the LocalSource folders on Harddisk.
It is worthwhile to mention that the USB-stick can be used repeatedly, there was no change.

Preparing the USB-stick is also taking much more time than with usb_prep7.cmd
Besides Windows PE (2x) takes a lot of extra space requiring about 300 MB.

So be very carefull and test USB-stick made with Microsoft Deployment
only on test computer without important DATA.

Regards,

wimb

This post has been edited by wimb: 17 November 2007 - 03:12 AM


#432 User is offline   jaclaz 

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

Posted 16 November 2007 - 05:15 AM

View Postilko_t, on Nov 9 2007, 08:13 PM, said:

Anyone thinking of GUI ? :rolleyes:

Regards,
ilko


Hmm..., no, sorry. :(

However, I am very partial, not being at all a programmer, to the Wizard's Apprentice:
http://wizapp.sourceforge.net/
the exe is just 70 Kb in size and has all the needed features.

Since the original procedure has been written in batch (no .NET installation required ;) ) it would be very easy to "convert" it in a way that uses this little proggie's features, when compared to other viable solutions (like AutoIT).

wimb, are you reading this? ;)

Have a look at my VDK pseudo-GUI batch that uses it to have an idea of it's potentiality:
http://home.graffiti.net/jaclaz:graffiti.n...ts/VDM/vdm.html

jaclaz

#433 User is offline   wimb 

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

Posted 16 November 2007 - 07:16 AM

View Postjaclaz, on Nov 16 2007, 12:15 PM, said:

However, I am very partial, not being at all a programmer, to the Wizard's Apprentice:
http://wizapp.sourceforge.net/
the exe is just 70 Kb in size and has all the needed features.

Since the original procedure has been written in batch (no .NET installation required ;) ) it would be very easy to "convert" it in a way that uses this little proggie's features, when compared to other viable solutions (like AutoIT).

wimb, are you reading this? ;)

Have a look at my VDK pseudo-GUI batch that uses it to have an idea of it's potentiality:
http://home.graffiti.net/jaclaz:graffiti.n...ts/VDM/vdm.html

@jaclaz
Interesting, I will have a look at it.
Thanks a lot. :)

Cheers,

wimb

This post has been edited by wimb: 16 November 2007 - 07:33 AM


#434 User is offline   wimb 

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

Posted 20 November 2007 - 02:35 AM

In usb_prep7.cmd we make the Boot folder $WIN_NT$.~BT by launching winnt32.exe /noreboot ....
When making MultiBoot DVD's with the very handy program Windows XP PowerPacker of Siginet,
I realised that Siginet is using a more sophisticated way to collect the files for the Boot folder.
See also: http://www.siginetso...forum/index.php

Siginet makes the Boot folder by parsing the dosnet.inf file.
Every [FloppyFiles.*] section in dosnet.inf is referring to the files needed in the boot folder.
The d1 is referenced in the [Directories] section, which shows the path of where the file resides.

Since we copy the complete XP Source to the LocalSource folder $WIN_NT$.~LS
and we can make the Boot folder $WIN_NT$.~BT from the Info in the dosnet.inf file,
it would not be necessary to launch winnt32.exe anymore.

wimb

This post has been edited by wimb: 28 November 2007 - 03:47 AM


#435 User is offline   mthomas 

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

Posted 20 November 2007 - 10:29 AM

http://www.bootdisk.com/ is a great site that may help. You may wish to check out their utilities section.

#436 User is offline   jaclaz 

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

Posted 20 November 2007 - 12:04 PM

View Postmthomas, on Nov 20 2007, 05:29 PM, said:

http://www.bootdisk.com/ is a great site that may help. You may wish to check out their utilities section.


Can I ask you the meaning of your post in this thread?

What would bootdisk.com help for?

Which utility on that site would help, and it would help who?

A good idea, expecially for people at their second post, would be to actually read what the thread is about, before posting unrequested and generic info.

jaclaz

#437 User is offline   wimb 

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

Posted 26 November 2007 - 01:57 AM

I have made a tiny Batch Program named BT_folder.cmd (see Attachment) :)
which from a given XPSOURCE directory will create the Windows XP Setup Bootfolder $WIN_NT$.~BT
named as XPBT folder in a given destination directory.

The BT_folder.cmd program makes the Bootfolder by parsing the dosnet.inf file.
Every [FloppyFiles.*] section in dosnet.inf is referring to the files needed in the boot folder.
The d1 is referenced in the [Directories] section, which shows the path of where the file resides.

I will integrate BT_folder.cmd program in the usb_prep.cmd program
so that Windows XP Setup Bootfolder can be made without launching winnt32.exe /noreboot ....

A disadvantage and danger of using winnt32.exe is
that it Deletes LocalSource folder $WIN_NT$.~LS in ROOT of ANY Drive :ph34r:
which needs precautions by renaming such existing folders on USB-stick or USB-harddisk.
This is no longer a problem when we use the code of BT_folder, which is also faster.

Before presenting a new version of usb_prep.cmd with integrated BT_folder.cmd and
hopefully some GUI enhancements, I would like to know if BT_folder.cmd is working well
for all versions of Windows XP.

I have tested BT_folder.cmd for Windows XP Professional and it works OK,
but I have no Media Center Edition or Tablet PC and would like to hear about
test results for these or other versions. ;)
The program was designed to take all versions of Windows XP into account.

Synchronize dirs ... Command of Total Commander with the Compare command
and using for Show only Green and Blue Arrows selected, ;)
can be used for comparing XPBT Bootfolder with existing Windows XP Setup $WIN_NT$.~BT Bootfolder.

The differece will only be the migrate.inf and winnt.sif files
which are added afterwards with the usb_prep.cmd program as Custom files.

Regards,

wimb

Edit 27nov7: BT_folder.cmd2.cmd was slightly modified to make it more general.

Edit 29 feb 2008: Updated to BT_folder3.cmd
Removed in some cases possible DOSNET.INF Parsing Error

Attached File(s)


This post has been edited by wimb: 29 February 2008 - 09:04 AM


#438 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • 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

Share this topic:


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

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



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