Post-Setup Script is not being updated

exelanz

Member
Hi all,

I have a script in post-setup (basically some winget app installs). However if I change/update the script, upon building the image, the old script remains in place. It does not get updated.

I also tried removing the script from post-setup and re-adding it, but same result.

What is the proper way to ensure updates to the script are being picked up?

Many thanks in advance.
 
Which folder is the script being pulled from? It shouldn't be kept in any NTLite-managed folder.
 
When you're "building an image", does that include creating an ISO at the same time?
 
Ok, let me provide some details.

Initial build:
  1. I load a Windows 11 image
  2. Change some settings in NTLite
  3. I add the PowerShell script - to install software - to post-setup, user tab
  4. I save the the changes in a preset
  5. I create ISO, boot from it, and software get's installed based on the script
The PowerShell script is stored outside NTLite context, something like z:\powershell.ps1

Second build:
  1. I make some changes to the power shell script (the one on the z: drive)
  2. I load a Windows 11 image
  3. I load my saved preset
  4. This will include the PowerShell script in post-setup, user tab
What do I need to do to use my updated PowerShell script?
  • Remove the old entry in post-setup and add the updated PowerShell script
I my case this does not do the trick. Still the old PowerShell script remains.

What is the correct procedure?
 
Last edited:
After testing, I was also surprised that NTLite didn't do what I expected. You would think NTLite would re-copy those files every time the preset is processed, but instead it's caching them.

If you reload the image & saved preset -- NTLite warns you have existing items. From the Post-Setup screen, each file is marked Existing on the rightmost column. Removing the existing files, and adding them back a 2nd time worked for me.

I imagine there's valid arguments on whether NTLite should cache Post-Setup files, presumably for performance reasons. Maybe the answer is for NTLite to add an optional Refresh Files checkbox to force file re-copying every time processing is done.

+nuhi
 
Thanks for confirming this behavior. Fully agree, a refresh button would be nice. But I do say that it would be nice the refresh can be done before ISO is build. Otherwise you have to wait for ISO to complete to see if the correct file is in there.
 
garlin I tried to do the same. But, old files are kept. When you say "remove existing files", do you do this in the NTLite interface or with windows file explorer and delete them from the cache directory?
 
Delete lines from the Post-Setup screen. Removing files from the ISO folder tends to confuse NTLite.
 
I followed the same flow but the files were not removed. Although I could see it as a task in ISO build screen. Now deleted it from the ISO and I see some kind or error during ISO build, but harmless.
 
So I tried it a couple of times. I now attach a screenshot when the ISO build is finished. You can see that adding the file and deleting it have "grey circles" where normally there shouldbe a "green circle". Any clue what this is garlin ??

ntlite.png
 
I'm not sure what's going on, haven't seen a grey dot before. Unless NTLite isn't allowed to access the files for some reason.
 
garlin well, I have setup windows + netlite from scratch and the behavior I reported has gone. File adding & deletion now works as expected.

Not sure what was the issue, not going to investigate as new install get's the desired situation.
 
Back
Top