OSDeploy / OSD

OSD Shared Functions
MIT License
144 stars 59 forks source link

Start-OOBEDeploy WinPE media #19

Closed ronmanp closed 2 years ago

ronmanp commented 2 years ago

Hi, this is not really an issue but more of a question. My goal is to build a zero-touch WinPE which works great with the following command. However I want to enable .NET Framework 3.5 and remove some bloatware so I created a json for OOBEDeploy which is in the workspace alongside my Autopilot json. I confirmed both JSON are in boot.wim too. Everything works fine but the Start-OOBEDeploy doesn't run automatically after the restart. Is there already an OSD function for that or perhaps I need to add my own command in setupcomplete.cmd ?

Edit-OSDCloudWinPE -Wallpaper "C:\OSDCloud\logo.jpg" -CloudDriver * -WorkspacePath C:\OSDCloudProd -StartOSDCloud "-OSVersion 'Windows 11' -OSBuild 21H2 -OSEdition Enterprise -OSLanguage en-gb -ZTI -Restart"

ronmanp commented 2 years ago

Start-OSDCloudGUI does detect the OOBEDeploy json and copies the json into c:\ProgramData\OSDeploy but nothing happens after the restart.

{
    "AddNetFX3":  {
                      "IsPresent":  true
                  },
    "RemoveAppx":  [
                       "Microsoft.BingNews",
                       "Microsoft.BingWeather",
                       "Microsoft.Getstarted",
                       "Microsoft.MicrosoftOfficeHub",
                       "Microsoft.People",
                       "microsoft.windowscommunicationsapps",
                       "Microsoft.WindowsMaps",
                       "Microsoft.YourPhone"
                   ],
    "UpdateWindows":  {
                          "IsPresent":  true
                      }
}
OSDeploy commented 2 years ago

Sounds like a good idea, but unfortunately there isn't anything that you can do to make it run automatically in OOBE. OOBE is designed specifically to not auto-start anything except OOBE. Anything you put in the Registry Run or in Unattend will run AFTER OOBE is complete. So you need to Shift + F10 to open a command prompt and kick this off yourself. There is zero that I can do about it. This is by Microsoft's design. I'm going to close this from the Issues as it is unsolvable in OOBE (although you can boot to Audit Mode and script it, but that will add a considerable amount of time)

ronmanp commented 2 years ago

This makes sense. Thank you for taking the time to respond and for this great tool.

rvdwegen commented 2 months ago

@ronmanp In case you're still looking for a solution. You can use AutoHotkey to simulate the Shift + F10.

AkosBakos commented 2 months ago

@ronmanp still looking for a solution?

https://akosbakos.ch/osdcloud-9-oobe-challenges/

ronmanp commented 2 months ago

Using ServiceUI is a great idea. Does seem like it would do the job for me. Thanks!