Need some help Windows 7 to 10 fully automated

Tonymontana1002

New Member
Cheers all. So far I created a fully automated windows 7 usb installer. It install windows 7. Then I need to upgrade to windows 10. I insert windows 10 USB and got a batch that does switches to .\setup.exe /auto upgrade etc. That does work. I want to know if there's any wait to script everything into a single usb. Boot from usb installs 7. Then once into the desktop via auto login in waits 120 seconds and run the script to do upgrade to windows 10. I tried various PowerShell scripts and batch files. But for some reason it doesn't like me copying the windows 10 files away from root of USB or PowerShell won't read my setup switches.
 
I don't understand your logic, but it won't work.

W10's Setup.exe ignores command line options when your host isn't W10. This makes it impossible to select your W10 image from a different location (no /installfrom or /imageindex).

https://docs.microsoft.com/en-us/wi...ws-setup-command-line-options?view=windows-10

ConfigurationApplicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or aboveYes
setupconfig.ini files used for feature updatesNo

Mounted 21H2 ISO from W7:

Win7-NTLite-2022-02-28-18-13-47.png
Win7-NTLite-2022-02-28-18-14-05.png

In-place upgrades don't support unattend mode, so running D:\setup isn't automated.
 
Last edited:
I am currently running the windows 10 setup.exe and it's switches do work from windows 7. I am looking at adding a script to the OEM folder Todo this. I am upgrading 100 machines and would save me tons of time.
 
I don't understand your logic, but it won't work.

W10's Setup.exe ignores command line options when your host isn't W10. This makes it impossible to select your W10 image from a different location (no /installfrom or /imageindex).

https://docs.microsoft.com/en-us/wi...ws-setup-command-line-options?view=windows-10

ConfigurationApplicable
Setup.exe started from WinPENo
Setup.exe started from Windows 10 or aboveYes
setupconfig.ini files used for feature updatesNo

Mounted 21H2 ISO from W7:

View attachment 6763
View attachment 6764

In-place upgrades don't support unattend mode, so running D:\setup isn't automated.
It does work for me I'll stop some pics today. I created a startupgrade.bat in there i have .\setup /auto upgrade etc. This is copied to the root of the USB "esd" install usb created using the Microsoft media creation tool. All i want to do this is find a way to do this automatically without the need to remote windows 7 custom key and insert windows 10 install usb and run the batch. I want to simple usb windows 7 usb tell it install windows 7 go to desktop and wait 240 seconds and then run the script to upgrade to windows 10. Doesn't even need to go to desktop.
 
You can see the script I use to run Window 10 upgrade from Windows 7 and it does work. I want away to automate this if possible.
Meaning install Windows 7 from usb, then once Windows 7 setup is done and login into desktop a script pickups automatically and starts the upgrade process to Windows 10.
 

Attachments

  • ESD4.JPG
    ESD4.JPG
    16.7 KB
  • ESD3.JPG
    ESD3.JPG
    29.4 KB
  • ESD2.JPG
    ESD2.JPG
    21.3 KB
  • ESD1.JPG
    ESD1.JPG
    26.9 KB
What problem are you trying solve by installing W7 first, instead of building a W10-only installer?
 
What problem are you trying solve by installing W7 first, instead of building a W10-only installer?
My situation is highly unique I need to install W7 first. and I also need to learn how to do this. I cannot install W10 directly.

This is for some school project, my teacher asked us to figure out how to do this. In order to pass the courses. I have managed to fully automate installed of W7 and somewhat automate upgrade to 10. Now we need to find a way to everything from single usb key and in one shot, no interactions.
 
Last edited:
This command seems to work if I copy the usb windows 10 to c drive and run this command

start /wait C:/Windows10upgrade\setup.exe /auto upgrade /migratedrivers all /dynamicupdate disable /showoobe none

is there anyway to automate this via the ntlite or other method, to excute this command on first boot, once login into windows desktop?

Theres the setupcomplete.cmd or other methods, run a powershell script?
 
Just add that CMD command or batch file in Post-Setup.
Windows setup is more or less done (99%) by the time SetupComplete runs, all it does afterwards is first-time logon.
 
This is for some school project, my teacher asked us to figure out how to do this. In order to pass the courses. I have managed to fully automate installed of W7 and somewhat automate upgrade to 10. Now we need to find a way to everything from single usb key and in one shot, no interactions.

Thanks. I was wondering why this project made no practical sense.
 
For extra credit, I would consider the solution of combining both W7 & W10 into a single WIM (ESD), and learning how to use image indices and sources\ei.cfg to selectively hide W10 from the boot installer.

If you really wanted it to exit to desktop, consider a (run once) scheduled task to kick off the upgrade.
 
One more issue, I can seem to get the command line to load setup.exe from whatever drive letter gets asssigned to that usb drive. Sometimes it goes to Drice E sometimes D:. How cna I tell it to alwauys load setup from root of the usb drive \win10folder\setup.exe /command line switcches?
 
Create a wrapper script in BAT or PowerShell, which scans each drive letter looking for \win10folder. Batch is easier because you don't have to worry about PowerShell's default execution policy.

Replace the previous Post-Setup command with your script.

Drive letters can be expected to change if Windows installs a new device driver and reboots. It depends on the scan order based on what disk or USB controllers are currently recognized.

EDIT
Code:
C:\Windows\system32>wmic logicaldisk where "drivetype=2" get Name,VolumeName
Name  VolumeName
D:    CORSAIR
 
Last edited:
For someone reaosn when I run this command from the root of the usb it works
.\setup.exe /auto upgrade /migratedrivers all /dynamicupdate disable /showoobe none
when I do it from usb drive letter:\Folder\Setup it no longer reads any of the switche after setup.exe /
 
Back
Top