MSFN Forum: How to install Windows from USB- WinSetupFromUSB with GUI - MSFN Forum

Jump to content


  • 100 Pages +
  • « First
  • 95
  • 96
  • 97
  • 98
  • 99
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

How to install Windows from USB- WinSetupFromUSB with GUI Lets make it easy

#1921 User is offline   jaclaz 

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

Posted 07 February 2013 - 12:57 PM

View PostZEUS__, on 07 February 2013 - 12:40 PM, said:

it's about %CDROM% variable. could you help with this?

Check this line:

Quote

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 Z) do if exist %%i:\sources\install.wim set CDROM=%%i:

It assigns a drive letter value to the variable CDROM IF it can find the file \sources\install.wim.

It seems like this file is NOT found (and thus the drive letter is not assigned)

WHO wrote that batch?
It is seemingly missing some error control and is all in all more complex than needed.

Change this:
::@echo off
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 Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

to this:
::@echo off
SETLOCAL ENABLEEXTENSIONS
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 Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%
PAUSE
IF NOT DEFINED CDROM SET /P CDROM=Enter drive letter
SET CDROM=%CDROM%:
SET CDROM=%CDROM:::=:%
SET CDROM
PAUSE



What happens?

jaclaz


#1922 User is offline   ZEUS__ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 185
  • Joined: 03-January 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 February 2013 - 03:20 PM

hi @jaclaz.. I'll try it now then I'll edit this post :)

my script based a tutorial from driverpacks forum.. I install updates that not integrate with DISM and regedit tweaks.

http://forum.driverp...pic.php?id=5199

I play with windows 8 new.. I test my setupcomplete.cmd with windows 8 updates etc. I think there are a few lines that useless for my windows 8 that commented out.. You think that any other lines that not needed for scripts working correctly?

#1923 User is offline   ilko_t 

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

Posted 07 February 2013 - 04:06 PM

@ ZEUS__

ISO is mounted as a virtual disc during PE pass using imdisk. After first restart it's not longer mounted, hence contents are not accessible, searching for install.wim or any other file on the DVD fails.

If all needed files are in that folder _ekler, you could copy it somewhere on the USB disk (\WINSETUP\ _ekler\ in this example) and amend your script to search for it, instead of \sources\install.wim.
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 Z) do if exist %%i:\WINSETUP\_ekler set CDROM=%%i:



Alternatively, you could try mounting the ISO file again at start of your script. Not sure if imdisk can be installed and used at that phase, but maybe worth a try.
Copy WinPreSetup.exe from boot.wim, second index, or use the suitable one from WinSetupFromUSB directory\files\winsetup\ according to your version, 32 or 64 bits.
Place it somewhere on the USB disk, search for it the same way as above and launch it at start of your script passing it the path to the ISO file, e.g.:
start /wait WinPreSetup.exe /mountiso="\WINSETUP\Win8\Win8.iso"


Windows 8 also has native functionality to mount an ISO file. No clue if it's working at that stage, but could be also worth a try.

#1924 User is offline   ZEUS__ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 185
  • Joined: 03-January 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 February 2013 - 05:16 PM

after @ilko_t wrote, here is a new post.
@jaclaz I gave a try but nothing changed. same as before it hangs on when setupcomplete.cmd and even PAUSE didn't work.

@ilko_t, I tried with this;

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 Z) do if exist %%i:\WINSETUP\_ekler set CDROM=%%i:
but again nothing changed. I think the key is your said about virtual disk that imdisk. the folder "_ekler" is in there but setupcomplete.cmd is in DVD :)

This post has been edited by ZEUS__: 07 February 2013 - 06:13 PM


#1925 User is offline   ilko_t 

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

Posted 07 February 2013 - 05:38 PM

Where is setupcomplete.cmd exactly in your source?
Are you using OEM key? Did you use the same key in VMWare?
There is a report which says the script is not launched if an OEM key is used.

Can you check the log files for clues?
http://technet.micro...y/hh824819.aspx

Added:
When are actually contents of $OEM$ folders copied, at which phase? :unsure:

#1926 User is offline   ZEUS__ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 185
  • Joined: 03-January 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 07 February 2013 - 06:25 PM

if I boot from the iso with vmware, setupcomplete.cmd works as expected and no error etc.


with usb I boot from plop.. and issue is begin when setupcomplete.cmd.. if I deleted all lines about %CDROM% variable setupcomplete.cmd passed successfully.
here is my script;

Posted Image


I'll check some logs now.

#1927 User is offline   ilko_t 

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

Posted 07 February 2013 - 06:37 PM

As I get it, setupcomplete.cmd is launched indeed, but it hangs the setup, right? I understood from your previous post that the script is not launched at all.

Quote

@ilko_t, I tried with this;

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 Z) do if exist %%i:\WINSETUP\_ekler set CDROM=%%i:
but again nothing changed. I think the key is your said about virtual disk that imdisk. the folder "_ekler" is in there but setupcomplete.cmd is in DVD

Did you copy _ekler folder to the USB disk, in \WINSETUP\_ekler?

#1928 User is offline   jaclaz 

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

Posted 08 February 2013 - 03:54 AM

View PostZEUS__, on 07 February 2013 - 05:16 PM, said:

@jaclaz I gave a try but nothing changed. same as before it hangs on when setupcomplete.cmd and even PAUSE didn't work.

Well, no.
Maybe the batch is launched "hidden" (and then you have to change the way it is started) but a pause is a pause, if that batch is launched and if it's command windows is visible, it will stop at the PAUSE commands.

jaclaz

#1929 User is offline   ZEUS__ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 185
  • Joined: 03-January 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 February 2013 - 03:57 AM

I didn't see any error in log file about hangs on.
Yes, my "_ekler" folder in "\WINSETUP\" .. I copied already.
here is my windows 7 setupcomplete.cmd.. as you see if I commented out lines with;

Quote

::IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows-KB890830-x64-V4.16.exe /Q



script works good but when use "start /wait %CDROM%" it hangs on... but wait when I write this I realize something that if I use "start /wait %CDROM%\WINSETUP\ekler\...."... I'll try it now..


@echo off
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 Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%
::Begin hotfix install


::Malicious software removal tool
::echo Installing Malicious Software Removal Tool
::IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows-KB890830-x64-V4.16.exe /Q
::IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows-KB890830-V4.16.exe /Q


::Defender Definitions
::echo Installing Windows Defender Definition updates
::IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\mpas-feX64.exe /Q
::IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\mpas-fe.exe /Q


::KB2533552
::echo Installing KB2533552 updates
::IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows6.1-KB2533552-x64.msu /quiet /norestart
::IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows6.1-KB2533552-x86.msu /quiet /norestart


::IE) desktop icon
::echo Installing KB2533552 updates
::IF EXIST %SystemRoot%\SysWOW64 regedit.exe /s %~dp0ADD_64.reg
::IF NOT EXIST %SystemRoot%\SysWOW64 regedit.exe /s %~dp0ADD_32.reg
regedit.exe /s %~dp0reg_w7.reg
%~dp0resetwmi.exe 


cd %~dp0
attrib -R -A -S -H *.*
del %~dp0reg_w7.reg
::del %~dp0ADD_64.reg
::del %~dp0ADD_32.reg
del %~dp0resetwmi.exe
SHUTDOWN /R /T 45
DEL /F /Q %0% >nul

This post has been edited by ilko_t: 08 February 2013 - 04:20 AM
Reason for edit: Fixed codebox


#1930 User is offline   ilko_t 

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

Posted 08 February 2013 - 04:11 AM

Quote

Yes, my "_ekler" folder in "\WINSETUP\" .. I copied already.


Hey, fix the paths in your script, they are all messed up.
Where is _ekler folder indeed? Under root or under WINSETUP?


This would NOT work as already mentioned, \sources\install.wim cannot be found since ISO is not mounted:
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 Z) do if exist %%i:\sources\install.wim set CDROM=%%i:


This MAY work if you copied _ekler folder inside WINSETUP folder:
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 Z) do if exist %%i:\WINSETUP\_ekler set CDROM=%%i:


This is wrong if _ekler folder is within WINSETUP folder:
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\_ekler\updates\Windows-KB890830-x64-V4.16.exe /Q


it should be
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WINSETUP\_ekler\updates\Windows-KB890830-x64-V4.16.exe /Q


and so on.

Added: and please, easy with the fonts and colors, try to properly format your posts.

#1931 User is offline   ZEUS__ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 185
  • Joined: 03-January 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 February 2013 - 04:32 AM

yes, yes, yes.. fixing the paths and this did the trick. thanks you so much for your efforts. :)

#1932 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 947
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 08 February 2013 - 09:52 AM

I would like to have an option to not compress the files added by WinSetupFromUSB to my installation source for easy modification of scripts. Especially the migrate.inf and setup.cmd files and the fake setup.exe should not be compressed to make a clear distinction between original and added files.

The setup.cmd can also be reduced in size by removing obsolete code.

File modifications to winnt.sif can be reduced:

win9xupgrade="no"
winntupgrade="no"
EulaComplete="1"


These lines are not necessary for USB support.

Autopartition and MsDosInitiated should use unquoted values.

#1933 User is offline   ilko_t 

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

Posted 10 February 2013 - 10:00 AM

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

I would like to have an option to not compress the files added by WinSetupFromUSB to my installation source for easy modification of scripts. Especially the migrate.inf and setup.cmd files and the fake setup.exe should not be compressed to make a clear distinction between original and added files.

They were compressed on purpose- on rare occasions there were reports for those files not being copied during text mode, setup complaining they were missing. Compressing them seems to have fixed the problem and I wouldn't change anything which is working fine without an important reason or finding why exactly this was happening. File sizes were not the issue I was after.
Migrate.inf is not compressed.

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

The setup.cmd can also be reduced in size by removing obsolete code.

Long overdue task, still ignored since focus is on much more important stuff.

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

File modifications to winnt.sif can be reduced:

win9xupgrade="no"
winntupgrade="no"
EulaComplete="1"


These lines are not necessary for USB support.

All these changes are there on purpose. Are there any issues with them?

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

Autopartition and MsDosInitiated should use unquoted values.
Care to spare more details why ?

#1934 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 947
  • Joined: 28-June 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 February 2013 - 03:55 PM

View Postilko_t, on 10 February 2013 - 10:00 AM, said:

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

I would like to have an option to not compress the files added by WinSetupFromUSB to my installation source for easy modification of scripts. Especially the migrate.inf and setup.cmd files and the fake setup.exe should not be compressed to make a clear distinction between original and added files.

They were compressed on purpose- on rare occasions there were reports for those files not being copied during text mode, setup complaining they were missing. Compressing them seems to have fixed the problem and I wouldn't change anything which is working fine without an important reason or finding why exactly this was happening. File sizes were not the issue I was after.
Migrate.inf is not compressed.

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

The setup.cmd can also be reduced in size by removing obsolete code.

Long overdue task, still ignored since focus is on much more important stuff.

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

File modifications to winnt.sif can be reduced:

win9xupgrade="no"
winntupgrade="no"
EulaComplete="1"


These lines are not necessary for USB support.

All these changes are there on purpose. Are there any issues with them?

View PostAcheron, on 08 February 2013 - 09:52 AM, said:

Autopartition and MsDosInitiated should use unquoted values.
Care to spare more details why ?


Normally quotes are only used to specify string values. You can save a few bytes by removing the quotes. The lines win9xupgrade="no", winntupgrade="no" and EulaComplete="1" are modifications to the answerfile which are not documented and not necessary to boot Windows setup from USB media.

#1935 User is offline   ilko_t 

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

Posted 12 February 2013 - 05:44 AM

Quote

Normally quotes are only used to specify string values. You can save a few bytes by removing the quotes.

Thanks for your notes, will keep them in mind.

Quote

The lines win9xupgrade="no", winntupgrade="no" and EulaComplete="1" are modifications to the answerfile which are not documented and not necessary to boot Windows setup from USB media.
As already explained, they are there on purpose and I'd rather leave them there for now unless a serious reason for the opposite comes up.

#1936 User is offline   Valeron 

  • Newbie
  • Group: Members
  • Posts: 13
  • Joined: 02-January 10

Posted 25 February 2013 - 07:07 AM

I recently encountered problems adding Ubuntu, ubcd5.x and Parted Magic, all use grub4dos method, with 1.0 beta8.
ubcd5.x can load into the menu, but several utility failed to work, include Parted Magic(pmagic-xxx.sqfs not found error).
Ubuntu: even a single iso installation won't work. loading it simply restart my PC. Official 12.10 iso distribution used.
Is there anyone share the same frustration with me?

This post has been edited by Valeron: 25 February 2013 - 07:11 AM


#1937 User is offline   ilko_t 

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

Posted 25 February 2013 - 08:20 AM

There was a bug in some grub4dos versions:
http://reboot.pro/to...ne/#entry164102
http://code.google.c...il?id=100&can=1

Get latest grub4dos package, stick to 0.4.5c versions:
http://code.google.c.../downloads/list

Extract grldr and grub.exe in \WInSetupFromUSB\files\grub4dos\ folder and recreate the USB disk.

If you don't want to recreate the USB disk, replace those 2 files in root of the USB disk.
If you have used the auto-format option, then you'd need to use FBInstTool to replace them in the hidden FB area of the disk, just run the tool and drag&drop the 2 files.

Or edit menu.lst and remove the NUL redirection around the lines starting with kernel and initrd as per the above topic.

As for UBCD- I don't know if it would work added it this way, have a look at their forum for clues:
http://www.ultimatebootcd.com/forums/

You may also use the syslinux option and add the contents of UBCD to the disk, it should be FAT32/16 formatted.

#1938 User is offline   bien1 

  • Group: Members
  • Posts: 2
  • Joined: 03-March 13
  • OS:none specified
  • Country: Country Flag

Posted 03 March 2013 - 02:32 PM

winsetup not working for me with live cd antivirus isos....anyone?

#1939 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 March 2013 - 02:45 PM

It's not designed to, and most of these ISOs cannot be used directly with plain grub4dos CD emulation without some modifications for each of them.
Try Sardu:
http://www.sarducd.it/
http://reboot.pro/fo...builder-usbdvd/

#1940 User is offline   bien1 

  • Group: Members
  • Posts: 2
  • Joined: 03-March 13
  • OS:none specified
  • Country: Country Flag

Posted 03 March 2013 - 06:19 PM

View Postilko_t, on 03 March 2013 - 02:45 PM, said:

It's not designed to, and most of these ISOs cannot be used directly with plain grub4dos CD emulation without some modifications for each of them.
Try Sardu:
http://www.sarducd.it/
http://reboot.pro/fo...builder-usbdvd/


sardu does not use grub4dos as winsetup?

Is sardu > winsetup?

This post has been edited by bien1: 03 March 2013 - 06:20 PM


Share this topic:


  • 100 Pages +
  • « First
  • 95
  • 96
  • 97
  • 98
  • 99
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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



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