OSDeploy / OSD

OSD Shared Functions
MIT License
130 stars 54 forks source link

SetupComplete Phase - Import from any Drive #107

Closed MichaelEscamilla closed 4 months ago

MichaelEscamilla commented 5 months ago

Is your feature request related to a problem? Please describe. Update the new 'SetupComplete Phase' from 24.1.3.1 to copy from any drive that has the folder ':\OSDCloud\Scripts\SetupComplete' instead of just from a USB instance of OSDCloud.

Describe the solution you'd like Update the new 'SetupComplete Phase' from 24.1.3.1 to copy from any drive that has the folder ':\OSDCloud\Scripts\SetupComplete' instead of just from a USB instance of OSDCloud.

Describe alternatives you've considered Nothing at the moment.

Additional context Something similar to 'Automated Path' https://www.osdcloud.com/osdcloud-automate/basic-configuration#automate-paths for storing the 'SetupComplete' folder so that it'll be copied to the ISO or USB when building those.

for importing, something similar to the https://github.com/OSDeploy/OSD/blob/05b482594734162d04e296596cc3ca5eb48334c5/Public/Start-OSDCloudGUI.ps1#L85 or https://github.com/OSDeploy/OSD/blob/05b482594734162d04e296596cc3ca5eb48334c5/Public/OSDCloud.ps1#L455 sections that look for the config files on any drive with the correct OSDCloud path.

gwblok commented 5 months ago

I'm planning to make it so OSDCloud will check the OSDCloudUSB in a specific location, which is the current behavior, but add the detection if: C:\OSDCloud\Scripts\SetupComplete\SetupComplete.cmd exists to run it.

MichaelEscamilla commented 5 months ago

When you say also check the C:\OSDCLOUD are you talking about the computer you're using to build you OSDCloudUSB/ISO?

Because if you are running OSDCloud, C: won't existing until the image is applied. Which meansnitnwould need to check X:\ or other drives when you're in WINPE.

Unless I'm misunderstanding what you are PLANNING, or how it is currently implemented.

gwblok commented 5 months ago

It will check C: on the device it is building. So basically my assumption is that you're scripting OSDCloud and after it finishes the WinPE phase, instead of having OSDCloud auto reboot, you have your script copy or build your custom Setup Complete files on C, then trigger your own reboot to have it continue.

MichaelEscamilla commented 5 months ago

Maybe I just don't understand how it works right now, so I'll take your word for it. because it seems like you have worked out in your head. I'll do some testing with the way you have it now to get a better understanding and maybe have a better perspective on it, and reply again.

Because if I have a Folder 'SetupComplete' with my SetupComplete.cmd and SetupComplete.ps1, it would be nice to just have it stored in my Workspace so that it'll always be copied to my ISO or USB when building those. That way OSDCloud will always copy it over and we won't have to run a script to create the files.

instead of having OSDCloud auto reboot, you have your script copy or build your custom Setup Complete files on C, then trigger your own reboot to have it continue.

So after OSDCloud runs and doesn't reboot, my script would then create the SetupComplete Folder and Files? Because at this point the Invoke-OSDCloud function is done running and wouldn't automatically copy those files over and add the commands to run.

gwblok commented 4 months ago

You can create the SetupComplete folder in your workspace, and it will copy over to the USB Drive too image

If you have your OSDCloud USB connected, you can also run this command to create a generic set of files for you: New-OSDCloudUSBSetupCompleteTemplate

I'll look into having it auto create a generic set as well when you create a new workspace, I do like that idea. When time allows.

gwblok commented 4 months ago

Note, the next release will add this function: New-OSDCloudWorkSpaceSetupCompleteTemplate That will create the two generic files in your Workspace.

gwblok commented 4 months ago

@MichaelEscamilla, I hope this is all making sense. Let me know if you need any more assistance on this. I'm closing for now.