Isolated WIM doesn't kick Post-Setup after small tweak

nbruce

New Member
Hello all. Long time lurker. I have a functional isolated build that runs the post-setup as intended. If I mount it for any reason, even though I don't modify anything and apply changes, even though there are no changes, it stops running the post setup which kicks my powershell script.

I am not using NTlite in an ISO format. I have a custom wim loader that allows me to select which OS I want to load on the device so everything should be packaged in the wim itself, which it is. For some reason it just can't be mounted/modified.

Any help would be appreciated.

Thanks.
 
Hello,

thanks for reporting, let me try to replicate.

So first is that functional post-setup made by the tool or you manually?
If by the tool, what's the second session change example that disables it?
Best would be a preset that I can apply and it disables my post-setup.


After rereading, you say no changes, hm, that makes no sense.
Testing.
 
Thanks for the reply. The functional post-setup is made by the tool. I have tried replacing the command called PS script with an updated one of the same name by copying the new and pasting with overwrite into the mounted directory and allowing to replace the old file. But that doesn't seem to be the cause. I have also tested just mounting the working wim, applying no changes and the post-setup fails to run then as well.

I also just copied the PS script from the mounted directory into the user post-setup as a file to run which also failed.

Here is a redacted Preset that I have just removed info and account info from.
 
Thanks, I have copied and deleted the preset as it contained a product key, not sure if it's a public one.

Tried to use an isolated WIM, added a Powershell script to Post-setup - Machine.
Reloaded the same image, changed one tweak or used your preset, no effect to the post-setup as far as it concerns on the image itself.

However, I have an idea.
Maybe the point is in the Unattended, the SkipOOBE part, or your integrated REG file.
I would be interested if SkipOOBE actually does it, that would make sense, since I'm done for today (8pm here), please try the Unattended with these two options disabled after loading your preset:
Skip Windows Welcome (SkipMachineOOBE)
and
Skip Welcome Center (SkipUserOOBE).

If that helps, will fix in the next update, and let me know what Unattended prompts you get with those disabled that it warranted using them?
 
OK I have disabled User and MachineOOBE skip and I can mount it and apply changes. As long as I don't make any changes the powershell script runs. If I modify the script, even 1 line it doesn't run via the post setup. The script can be run after it logs in with no errors but it fails to run through the post setup. Do I need to create the post-setup command after the powershell is modified since the file size changes by 1kb?
 
1702315101847.png
This is how I have it referencing the script and it functions until I do anything to the ps1 in the mounted directory.
 
There's two problems with this line. The correct syntax is Command | Parameters
I don't know if your final image actually has a "sources\$OEM$\$1\WinSetup\Setup\Scripts" folder, or you're extrapolating the wrong folder path.

CommandParameters
powershell-NoProfile -ExecutionPolicy Bypass %WINDIR%\Setup\Scripts\File.ps1
 
There's two problems with this line. The correct syntax is Command | Parameters
I don't know if your final image actually has a "sources\$OEM$\$1\WinSetup\Setup\Scripts" folder, or you're extrapolating the wrong folder path.

CommandParameters
powershell-NoProfile -ExecutionPolicy Bypass %WINDIR%\Setup\Scripts\File.ps1
I added the folders to the mounted directory for the files. I will try modifying the script. It's odd that it runs the way I have it set unless I modify the ps1 file in any way.

1702315820779.png
 
You mean quotes? Quotes are generally recommended, from force of habit, because sometimes paths have spaces in them.

If you're copying local files into the mounted image (\WinSetup\Setup\Scripts), then your current path is correct as before. The $OEM$ method is just another way to externalize the same process, but without having to always mount the image to make local file updates.
 
You mean quotes? Quotes are generally recommended, from force of habit, because sometimes paths have spaces in them.

If you're copying local files into the mounted image (\WinSetup\Setup\Scripts), then your current path is correct as before. The $OEM$ method is just another way to externalize the same process, but without having to always mount the image to make local file updates.
Yeah I meant quotes. My excuse is Monday and Java is still installing in my brain.

Thank you! This seems to have fixed the process. I have no idea why it ran normally before with the incorrect syntax in the post-setup. Anyway, I'll take the win and walk away...
 
Back
Top