Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

How to install Windows from USB- WinSetupFromUSB with GUI


  • Please log in to reply
2120 replies to this topic

#426
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Was nLite.cmd in \windows\system32\ ?
Was directory C:\Install\ present on the target computer?

Please attach USB_stick\$WIN_NT$.~LS\I386\presetup.cmd and c:\dir.txt from your computer, which is made after running this:

dir /s /a U: > c:\dir.txt
Replace U: with the drive letter of your USB stick.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB



How to remove advertisement from MSFN

#427
nai22

nai22

    Newbie

  • Member
  • 10 posts

Was nLite.cmd in \windows\system32\ ?
Was directory C:\Install\ present on the target computer?

Please attach USB_stick\$WIN_NT$.~LS\I386\presetup.cmd and c:\dir.txt from your computer, which is made after running this:

dir /s /a U: > c:\dir.txt
Replace U: with the drive letter of your USB stick.


yes nlite.cmd was in \windows\system32\ (because its from nlite.cm_ \$WIN_NT$.~LS\I386\

yes install directory was present because i put it \$WIN_NT$.~LS\$OEM$\$1\ before

sorry i cant find any "c:\dir.txt"

yes my setup-usbstick always get u: as driveletter, i think its ok so, maybe i dont need to make an extra directory "install", cause all these guirunonce files already exist in this folder \$WIN_NT$.~LS\I386\SVCPACK\

if i burn this xp-iso to dvd. everything went ok.
[GuiRunOnce]
"%systemroot%\system32\nlite.cmd"

Attached Files



#428
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,205 posts
  • OS:none specified
  • Country: Country Flag

sorry i cant find any "c:\dir.txt"


Sure :), there isn't any.

Open a Console Window, (Start->Run->cmd.exe-> click OK or Start>Programs->Accessories->Command Prompt) and type in it:

dir /s /a U: > c:\dir.txt


and press [ENTER].

A C:\dir.txt file will be created containing the output of the command dir /a /s i.e. a complete listing of files and directories on the stick.

jaclaz

Edited by jaclaz, 22 April 2009 - 08:44 AM.


#429
nai22

nai22

    Newbie

  • Member
  • 10 posts
gratie jaclaz :thumbup

and here is my dir.txt

Attached Files

  • Attached File  dir.zip   102.29KB   11 downloads


#430
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
So everything is in place (C:\install\ exists, right?), but nLite.cmd is not executed. I an not aware with any issue with GUIRunOnce entries and USB setup, actually it has been used successfully since the first batch files to execute undoren.cmd and binifix.cmd.

Maybe looking at setup log files may reveal what went wrong :unsure:
Please attach the following files from the target computer:
c:\windows\setuplog.txt
c:\windows\setuperr.log
c:\windows\Setuperr.txt
c:\windows\Setupact.log

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#431
nai22

nai22

    Newbie

  • Member
  • 10 posts

So everything is in place (C:\install\ exists, right?), but nLite.cmd is not executed.


yes you are right, i dunno why nlite.cmd is not executed, realy strange

the origin nlite.cmd (nlite.cm_) which im using on my installation-dvd looks like this

for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
"%Source%I386\SVCPACK\IRFA.EXE"
"%Source%I386\SVCPACK\MP3D.exe"
"%Source%I386\SVCPACK\QIP.EXE"
"%Source%I386\SVCPACK\MPUI.EXE"
"%Source%I386\SVCPACK\Skype40.exe"
"%Source%I386\SVCPACK\GIMP.EXE"
"%Source%I386\SVCPACK\XNVF.EXE"
"%Source%I386\svcpack\OpenOffice.org3.0.1.exe"
"%Source%I386\SVCPACK\PAIN.EXE"
"%Source%I386\SVCPACK\AV9_Silent.exe"
"%Source%I386\SVCPACK\PDFC.EXE"
EXIT

but this untouched nlite.cmd also didnt work on usb, thats why i made a directory called "install"with this above ssetups. thought something went wrong if the folders name look like this "$WIN_NT$.~LS"

Attached Files



#432
nai22

nai22

    Newbie

  • Member
  • 10 posts
in my $winnt$.inf

[GuiRunOnce]
"%SystemRoot%\System32\nLite.cmd"=""

is that normal? "=""

#433
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,205 posts
  • OS:none specified
  • Country: Country Flag
@nai22

How do you know if the .cmd is not executed?

The whole .cmd is dependent upon a "conditional" variable definition (depending of a string in Registry) and has no error control, thus if the for loop returns an empty string and the SOURCE varaible is not defined it won't ever work.

Edit it as follows:

for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
SET SOURCE
PAUSE
IF NOT DEFINED SOURCE ECHO "SOURCE variable is NOT defined"&PAUSE

"%Source%I386\SVCPACK\IRFA.EXE"
"%Source%I386\SVCPACK\MP3D.exe"
"%Source%I386\SVCPACK\QIP.EXE"
"%Source%I386\SVCPACK\MPUI.EXE"
"%Source%I386\SVCPACK\Skype40.exe"
"%Source%I386\SVCPACK\GIMP.EXE"
"%Source%I386\SVCPACK\XNVF.EXE"
"%Source%I386\svcpack\OpenOffice.org3.0.1.exe"
"%Source%I386\SVCPACK\PAIN.EXE"
"%Source%I386\SVCPACK\AV9_Silent.exe"
"%Source%I386\SVCPACK\PDFC.EXE"
PAUSE
EXIT


and see what happens.

Whatever value SOURCE may get, the resulting path will be:
<whatever>I386\SVCPACK\
which can NEVER be the right value:
U:\$WIN_NT$.~LS\$OEM$\$1\INSTALL

Verzeichnis von U:\$WIN_NT$.~LS\$OEM$\$1\INSTALL

22.04.2009 11:40 <DIR> .
22.04.2009 11:40 <DIR> ..
15.04.2009 20:26 30.675.464 AV9_SILENT.EXE
23.11.2008 22:28 16.175.084 GIMP.EXE
18.02.2009 01:06 9.047.574 IRFA.EXE
12.01.2009 14:49 277.856 MP3D.EXE
23.11.2008 19:42 27.763.683 MPUI.EXE
13.02.2009 12:48 138.755.378 OPENOFFICE.ORG3.0.1.EXE
10.09.2008 01:03 1.671.431 PAIN.EXE
31.12.2008 00:36 16.203.379 PDFC.EXE
04.03.2009 22:39 3.376.810 QIP.EXE
23.02.2009 01:50 15.101.049 SKYPE40.EXE
22.04.2009 11:34 329 UPDATE.CMD
23.11.2008 22:33 9.210.824 XNVF.EXE
12 Datei(en) 268.258.861 Bytes


:whistle:

jaclaz

#434
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag

in my $winnt$.inf

[GuiRunOnce]
"%SystemRoot%\System32\nLite.cmd"=""

is that normal? "=""

I guess yes. This line is made out of winnt.sif and the syntax there seems correct, so I assume this "translation" is also correct.

Try modifying winnt.sif to:
[GuiRunOnce]
Command0=%SystemRoot%\System32\nLite.cmd

If still no luck- try adding START /WAIT to each line of nLite.cmd.

Ensure nLite.cmd is not executed indeed- add a line on the top:
echo TEST > c:\test.txt

After install is file c:\test.txt present?

======================

You may also try to modify the original nlite.cmd from svcpack and use this method, replace the top line with this:

SET TAGFILE=\$WIN_NT$.~LS
FOR %%h IN (U D M N O P Q R S T V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET CDDRIVE=%%h:
if "%CDDRIVE%" == "" (
FOR %%h IN (C E F G H I J K L) DO IF EXIST "%%h:%TAGFILE%" SET CDDRIVE=%%h:
)
SET Source = %CDDRIVE%\$WIN_NT$.~LS\

Jaclaz- nLite.cmd he used is attached in archive in one of the previous posts. The one you quoted is produced by nLite I guess, unless he modified it.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#435
nai22

nai22

    Newbie

  • Member
  • 10 posts

@nai22

How do you know if the .cmd is not executed?

The whole .cmd is dependent upon a "conditional" variable definition (depending of a string in Registry) and has no error control, thus if the for loop returns an empty string and the SOURCE varaible is not defined it won't ever work.


because, i can start this script (windows\system32\nlite.cmd) manually by doubleclick and all programs will be installed ok. but i will follow you suggestion and add the checking options :yes:

#436
nai22

nai22

    Newbie

  • Member
  • 10 posts

for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
SET SOURCE
PAUSE
IF NOT DEFINED SOURCE ECHO "SOURCE variable is NOT defined"&PAUSE

"%Source%I386\SVCPACK\IRFA.EXE"
"%Source%I386\SVCPACK\MP3D.exe"
"%Source%I386\SVCPACK\QIP.EXE"
"%Source%I386\SVCPACK\MPUI.EXE"
"%Source%I386\SVCPACK\Skype40.exe"
"%Source%I386\SVCPACK\GIMP.EXE"
"%Source%I386\SVCPACK\XNVF.EXE"
"%Source%I386\svcpack\OpenOffice.org3.0.1.exe"
"%Source%I386\SVCPACK\PAIN.EXE"
"%Source%I386\SVCPACK\AV9_Silent.exe"
"%Source%I386\SVCPACK\PDFC.EXE"
PAUSE
EXIT




i started this script manually
this is the result:

C:\WINDOWS\system32>for /F "tokens=3" %i IN ('reg query HKLM\SOFTWARE\Microsoft\
Windows\CurrentVersion\Setup /v "SourcePath" | findstr "REG_SZ"') do set SOURCE=
%i

C:\WINDOWS\system32>set SOURCE=U:\$WIN_NT$.~LS

C:\WINDOWS\system32>SET SOURCE
SOURCE=U:\$WIN_NT$.~LS

C:\WINDOWS\system32>PAUSE
Drücken Sie eine beliebige Taste . . .

C:\WINDOWS\system32>IF NOT DEFINED SOURCE ECHO "SOURCE variable is NOT defined"
 & PAUSE

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\IRFA.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\MP3D.exe"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\QIP.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\MPUI.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\Skype40.exe"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\GIMP.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\XNVF.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\svcpack\OpenOffice.org3.0.1.exe"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\PAIN.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\AV9_Silent.exe"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>"U:\$WIN_NT$.~LSI386\SVCPACK\PDFC.EXE"
Das System kann den angegebenen Pfad nicht finden.

C:\WINDOWS\system32>PAUSE
Drücken Sie eine beliebige Taste . . .


#437
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,205 posts
  • OS:none specified
  • Country: Country Flag
As expected. :)

the .cmd runs allright, but it cannot find any file and closes without doing anything.

A more suitable .cmd:
for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i

::Adjust following to your actual path
SET RelPath=\$OEM$\$1\INSTALL
::Adjust the above to your actual path

"%Source%%RelPath%\SVCPACK\IRFA.EXE" 
"%Source%%RelPath%\SVCPACK\MP3D.exe"
"%Source%%RelPath%\SVCPACK\QIP.EXE"
"%Source%%RelPath%\SVCPACK\MPUI.EXE"
"%Source%%RelPath%\SVCPACK\Skype40.exe"
"%Source%%RelPath%\SVCPACK\GIMP.EXE"
"%Source%%RelPath%\SVCPACK\XNVF.EXE"
"%Source%%RelPath%\svcpack\OpenOffice.org3.0.1.exe"
"%Source%%RelPath%\SVCPACK\PAIN.EXE"
"%Source%%RelPath%\SVCPACK\AV9_Silent.exe"
"%Source%%RelPath%\SVCPACK\PDFC.EXE"
EXIT

jaclaz

#438
nai22

nai22

    Newbie

  • Member
  • 10 posts
dear ilko t, dear jaclaz,

thank you so much for helping me, now all problems being solved.

installation success with guirunonce option

solution:

winnt.sif
[GuiRunOnce]
Command0=%SystemRoot%\System32\nLite.cmd
:thumbup
@ ilko t
that is it !!!


nlite.cmd
for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
SET SOURCE
"%Source%\I386\SVCPACK\IRFA.EXE"
"%Source%\I386\SVCPACK\MP3D.exe"
"%Source%\I386\SVCPACK\QIP.EXE"
"%Source%\I386\SVCPACK\MPUI.EXE"
"%Source%\I386\SVCPACK\Skype40.exe"
"%Source%\I386\SVCPACK\GIMP.EXE"
"%Source%\I386\SVCPACK\XNVF.EXE"
"%Source%\I386\svcpack\OpenOffice.org3.0.1.exe"
"%Source%\I386\SVCPACK\PAIN.EXE"
"%Source%\I386\SVCPACK\AV9_Silent.exe"
"%Source%\I386\SVCPACK\PDFC.EXE"
EXIT
:thumbup
jaclaz code was near 100% :) , only 1 "\" between %Source% and I386 was missing, thats why the script coudnt find the files on the stick


again thank you so much, the combination of your two tips was the solution for my problem, jiiipiii

cheers

#439
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Happy the read everything is fixed now :)

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#440
Sergo

Sergo

    Newbie

  • Member
  • 23 posts
Edit:

Tried on another machine (first one was Lenovo X61, this one lenovo M57e)
it seems to be working OK
============

Tried new version today
Seems ok, but for some reason,
windows doesn't boot from hard drive
no errors, just blinking cursor,
booting from usb using grub4dos and starting ntldr from _hard drive_ using boot.ini from hard drive works ok,
installing same image from CD - OK.

Fixmbr,fixboot from recovery console does not help. :(

winnt.sif unattended section is now FULLY supported, including custom directories and drivers paths


c.f. presetup.cmd

IF EXIST %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$Progs\nul xcopy %CDDRIVE%\$WIN_NT$.~LS\$OEM$\$Progs\*.* "%systemdrive%\Program Files\" /i /k /e /r /y /h


I changed
%systemdrive%\Program Files\

to %programfiles%\

seems working.

Edited by Sergo, 29 April 2009 - 04:33 PM.

=================
Best regards,
Sergo.

#441
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,205 posts
  • OS:none specified
  • Country: Country Flag

Fixmbr,fixboot from recovery console does not help. :(


Sure they don't work.

A blinking cursor means something is wrong in either the MBR or the bootsector DATA.

Both Fixmbr and Fixboot "fix" the MBR or bootsector CODE.

Save the MBR (one sector) first sector of Physicaldrive
Save the bootsector (one sector if FAT16, 6 sectors if FAT32 and 16 sectors in NTFS) first sector(s) of logicaldrive

With HDhacker:
http://dimio.altervista.org/eng/

Compress them together in a .zip file and attach it to your next post.

BEFORE that, check that the Partition has been set as Active in the MBR, by using Beeblebrox:
http://students.cs.byu.edu/~codyb/
or a similar utility, or directly grub4dos command line.

http://diddy.boot-la...iles/basics.htm
http://diddy.boot-la...s/files/cli.htm
http://diddy.boot-la...es/commands.htm
http://diddy.boot-la....htm#makeactive

Typically when booted grub4dos from USB stick and no drive re-mappings hooked:

makeactive (hd1,0)


(hd0,0) is first partition of the booted device (the USB stick)
(hd1,0) is first partition of the second device (the internal hard disk)

jaclaz

#442
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag

...I changed
%systemdrive%\Program Files\

to %programfiles%\

seems working.

Nice catch, thanks.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#443
Sergo

Sergo

    Newbie

  • Member
  • 23 posts

Seems ok, but for some reason,
windows doesn't boot from hard drive


I tried to reinstall from a usb key again today on the same machine (X61)
works ok.
Hopefully it was a random glitch
=================
Best regards,
Sergo.

#444
JustSeanV67

JustSeanV67
  • Member
  • 1 posts
I used this software to install XP on brand new AMD/MSI combo. This was a HUGE timesaver and I really appreciate it!

No more burning CDs/DVDs ever again!

This was done right... The first time!

Anybody ever say if this was a "Green" alternative, as this helps not to have to use energy to burn the platters? I'd say so!

Sean

#445
zZolaa

zZolaa

    Newbie

  • Member
  • 23 posts
Hi thanks for this great project.

I have 4 questions.


1)

My USB stick just has 1 partition... can I safely store Backup files on this same same partition as WinSetupFromUSB setup files are?
For example, I put them there in \Backup\ onto same partition as \$WIN_NT$.~BT\ etc?
The setup procedure will not delete it?


2)

How can I keep setup from deleting some files so I have to "fix" the Key every time I use it?
I want to use this key to install computers at a Lab I administer... I would like to just go from computer to computer and install each one from USB, without having to run WinSetupFromUSB 30 times, which ruins it, then I might as well use a CD...


3)

Is this program "portable" ?
Does WinSetupFromUSB have to be in C:\WinSetupFromUSB\ ?
Can I just make copy of folder then uninstall it and delete uninstall.exe?
And then can I use it from E:\Apps\ ?


4)

I use nLite, will my final C:\Windows\ install be larger,
because I had to keep "Operating System Options -> Manual Install and Upgrade" support?

Edited by zZolaa, 06 May 2009 - 02:03 PM.


#446
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag

I used this software to install XP on brand new AMD/MSI combo. This was a HUGE timesaver and I really appreciate it!

No more burning CDs/DVDs ever again!

This was done right... The first time!

Anybody ever say if this was a "Green" alternative, as this helps not to have to use energy to burn the platters? I'd say so!

Sean

Thanks for the kind words :)


Hi thanks for this great project.

I have 4 questions...


1) You should be safe to do so, just do it AFTER formatting the USB stick and praparing it with WSFUSB. The reason is that some BIOSes won't find the boot files if they are placed beyond certain boundary.

2) If you will be installing XP 32 bits SP2 or SP3 then there should be no files deleted. If it's XP x64, 2003 or 2000 then there is a quick workaround since you have 30 similar machines or all they have 1 internal hard disk and no card readers attached, just say if you need details.

3) You should be safe to move it elsewhere as well as you can initially install it elsewhere, preferably in path without spaces in it, although this should be already fixed but not thoroughly tested.

4) No, this would not grow your resulting Windows folder.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#447
cochabambinito

cochabambinito
  • Member
  • 3 posts
Is there a version supporting Windows 7 RC?
When I Browse for providing the path of setup files (the DVD) it says "could not find DOSNET.INF".... no valid source, etc...

#448
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Are you selecting I386 folder itself? Do not, select its parent folder, which contains I386.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#449
cochabambinito

cochabambinito
  • Member
  • 3 posts
Of course.. I've tried everything! the root folder, the ither folders... THERE IS NOT a I386 folder in Win7 installer...

Are you selecting I386 folder itself? Do not, select its parent folder, which contains I386.



#450
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Wait a second, you need to put Windows 7 on the USB stick, right? Then use the appropriate field, I guess you are using the one for 2000/XP/2003, do NOT. Use the appropriate field and select the root of the DVD:
Posted Image

Initially I thought you run the program on Windows 7, not that you need to put 7 on USB stick.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB





8 user(s) are reading this topic

0 members, 8 guests, 0 anonymous users



How to remove advertisement from MSFN