-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sysprep warning message in 8.5.2 #29
Comments
It is the same as when we try to install it for all users. However, the multi-user fix we did earlier this week also works there. So the first time they right click a file after they create the user, it will be there. This requires 8.5.3 though, so the version they are using (8.5.2) doesn't do that 🙂 |
Sorry I don't follow you - what's in v8.5.3 makes difference?
So if I understand correctly, while installer registering NppShell.dll for the Adm user, Sysprep has detected it and complains? If it is, Sysprep will always complain with our current solution (installing for user on the first use), won't it? |
@donho in the test builds we have now, this code exists: Line 409 in e250ff9
Sysprep complains that the package is only installed for a normal user, and not provisioned for everyone (which is what you cannot do for a sparse package - or to be more specific, you can do it, but it doesn't get installed for other users when they log in). |
So TEST20 should fix it, shouldn't it? |
@donho it will make sure it is installed for the user on first right click. |
You mean on the 2nd right click, right?
OK, thank you for your answer. |
@donho on the first right click, it will trigger the install of the msix package, so it will be there on the second right click 🙂 |
Yes, sure. Sorry for misreading. Thank you for the reply. |
🙂 |
Thanks everyone for reporting this error, I was just building new images for family systems updating to 11 and kept running into this error when trying to sysprep generalize when it worked without issue a few months ago! Looks like it will be resolved in 8.5.3 so I will keep an eye out and test when it drops! EDIT: if TEST20 is supposed to resolve the issue, it does not, this PREVENTS sysprep generalize from completing. |
@Hammerfest sysprep fails if a package is provisioned for the user but not the system? |
Correct, exact message at the opening comment
|
@Hammerfest can you try this, and then run sysprep again: |
The package will be reinstalled automatically |
This worked, it should be noted however that if you create a template user (not done often by many) it will need to be done on both the user and sysprep account or it will still fail. Might be to much of a PITA to properly resolve this to simply install upon account creation or provide an integration pack like Microsoft does for some of its tools. |
@Hammerfest the problem is that provisioning the package on a system level doesn't work for sparse package, so we simply cannot do that. |
I don't know with what authority you are saying the bolded part, but your claim is totally incorrect. Sysprep is not issuing a warning which can be ignored — it is throwing an error since it fails to reseal the image to OOBE state because of this improperly provisioned package. When we are at the subject of that package, I don't like how it is done silently without notifying the user that it is being installed. Such behavior is always automatically associated in my head with malware. I don't know what is the purpose of that package (and frankly I don't care because it seems to work for me without it), but if it interferes with Changes like this should be properly tested or at least announced clearly in release notes — you can't expect people to come read the commit logs and merge / pull requests on GitHub to find out stuff like that. |
@levicki the problem is that you cannot provision a sparse package on the machine level, since it doesn't get installed by the user. I don't know why Microsoft hasn't implemented the logic to allowed provisioning sparse packages. |
I understood that much. What I didn't understand is what problem is using a sparse package trying to solve in the first place? Is it registering the shell extension per user? If so, then why not just use the An example of Brave doing just that:
So for example you could do (I generated random GUID, you could use the ProductID if you are using MSI installer):
That will get executed for each new user only once, after that the corresponding mirror of the HKLM key will be created in HKCU and marked as installed so it won't be run again if the exact match is found. Afterwards if you want to re-run it you just increase version number. Note that if you want multipart version number (like Brave uses above) you must use comma ( More details here and on Google of course. TL;DR — If you are a desktop application then work like a desktop application, and if you are a store application then make a proper MSIX package that can be provisioned for all users instead of mixing apples and oranges. |
@GurliGebis |
@donho I don't think that's possible, @GurliGebis said sparse package cannot be provisioned on the system level. It's much easier to do this using the Active Setup registry key instead of building an appx as I have explained in the post above yours. If you really want to go the Store route, then you should make whole Notepad++ into an appx/msix that can be provisioned into the image for all users instead of having to run regular setup, and then we won't be having this problem. As I said, you are either a desktop app or a store app. You can't really be both (well technically you can skirt it, but it will just give you and the users headaches). |
@donho from what I tried earlier, when we had to find a solution for installing it for all users on the system, it seems like it just doesn't work. |
To follow |
@Hammerfest How, exactly? I installed NPP as Administrator in Audit Mode -- there are no other accounts. Running |
I haven't tried with anything past 8.5.3, its possible something changed Outside of that the process was reboot into audit mode from OOBE, install programs, restart, run command, then perform sysprep shutdown to OOBE, I wanna say if you restart at all after running the command to remove the package it re-installs on next login of the account I need to make a new image, will try that this weekend. |
@Hammerfest Thanks for the quick reply! In my case, it's for VMware Horizon (VDI), non-persistent desktops. I can confirm that the AppxPackage comes back during the next logon, but in my experience, removing the package and then running sysprep immediately after (on NPP 8.5.3 and newer) failed. When we update the Desktop Pools later this month, the machine will have NPP 8.5.2 on it. NPP is already up to 8.5.5 and the sysprep issue is not resolved. Hopefully, it will be, sooner than later! |
I'm also building images for a VMware Horizon VDI environment. I have an automated build process which builds and deploys our golden image templates. I just checked last night's build and it worked fine with NPP 8.5.4 in the image. The build uses Chocolatey to install NPP and then removes the AppX pacakge:
The Horizon customization process ran fine afterwards. |
@benlye That is great to know! It's a manual process for us, so we'll have to try 8.5.4 next month. |
Notepad++ 8.5.7 addresses some bad vulnerabilities. However, after running the Remove-AppxPackage command, sysprep still breaks. Is there a way to fix this? @benlye , have you come across this? |
My build process appears to be working fine with NPP 8.5.7 using the |
@benlye Lucky you! I rebooted the image. After a few minutes, the package came back so I removed it again with the command, and then Generalize via OSOT worked. I don't understand... but I'll take it. |
I created a github account just to thank you for this - fixed my issue. Thank you! |
I wanted to report we're seeing this still with 8.6.4 as we're building our first Windows 11 sysprep image. I can run the command above but I have to immediately sysprep the system otherwise it will re-inject the Appx within minutes. Would it be possible to when the application is installed as admin to provision the Appx to all users instead of just the installed one? That would solve this issue. Or provide the ability to add a flag to disable this behavior for image based systems? The extra frustrating part is we've disable the new Windows 11 right click menu to use the Windows 10 style one so the Appx package isn't even needed. |
@brentil That does not work for some reason. |
Still struggling with this on W11 23H2, using NPP 8.6.7. Was working at one point with a previous version. If I revert to version 8.4.9, works perfectly! |
Same problem here with 8.6.7 trying to syspred an Azure VM. Running Tried various versions of Remove-AppxPackage including running for each user. Deleted all remants in registry and on local filesystem, and still getting:
I got this to work yesterday on a VM created via the same snapshot from the same VM source... so I'm not sure what the heck is going on... Just adding my notes to this in case there's anything useful. |
Older versions still work, see my notes above.
[signature_1901198342]<https://optimumhit.com/>
Orion Withrow (He/Him/His)
Cloud Architect
Phone: 804-388-2971
Email: ***@***.******@***.***>
www.optimumhit.com<https://www.optimumhit.com/>
TRULY HUMAN NOTICE: Getting this email out of normal working hours? We work at a digitally enabled relentless pace, which can disrupt our ability to sleep enough, eat right, exercise, and spend time with the people that matter most. I am sending you this email at a time that works for me. Please respond to it at a time that is convenient for you.
From: Brenden Walker ***@***.***>
Date: Thursday, June 6, 2024 at 1:55 PM
To: notepad-plus-plus/nppShell ***@***.***>
Cc: Orion Withrow ***@***.***>, Comment ***@***.***>
Subject: Re: [notepad-plus-plus/nppShell] Sysprep warning message in 8.5.2 (Issue #29)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Same problem here with 8.6.7 trying to syspred an Azure VM.
Running Get-AppxPackage | findstr /I "note" from admin PS returns no notepad++ packages installed.
Tried various versions of Remove-AppxPackage including running for each user.
Deleted all remants in registry and on local filesystem, and still getting:
2024-06-06 17:39:39, Error SYSPRP Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
I got this to work yesterday on a VM created via the same snapshot from the same VM source... so I'm not sure what the heck is going on... Just adding my notes to this in case there's anything useful.
—
Reply to this email directly, view it on GitHub<#29 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7S4U6SWULME2QMLMUTC5U3ZGCPBFAVCNFSM6AAAAAAW4QHO7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTGA4TINRYGQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Yes, this happened after the option to edit using the reverse button was included in Windows. Versions that did not have this option are free from this problem with sysprep. Can the programmers help make a version with this fix? I really need Notepadd++ on my versions of Windows using sysprep, but I'm having to use the npp.8.5.Installer.x64.exe version that did not have this option yet. If I install the new version, this problem occurs. 2024-10-24 11:17:30, Error SYSPRP Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6 was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image. |
@jlsupremo1 all you have to do to fix it with a newer version of Notepad++ is to remove the Appx right before you call sysprep. Just don't right click on anything between that and running sysprep because it'll re-inject it again... Get-AppxPackage -Name NotepadPlusPlus | Remove-AppXPackage |
I didn't understand, but removing this (Get-AppxPackage -Name NotepadPlusPlus | Remove-AppXPackage) doesn't affect notepad++ after reconfiguring windows? Isn't it missing a component or itself?
|
No, all it's doing is removing the Windows 11 right click injection application, it's not Notepad++ you're removing. That injection app is what's causing the sysprep issues and not Notepad++ itself. |
So what to do to fix this problem? |
@oranmizrahi run the Remove-AppXPackage, followed by sysprepping the image. |
I already ran Remove-AppxPackage and attempted to Sysprep the image, but it didn't work. Notepad++ still shows up when checking with Get-AppxPackage -AllUsers -Name NotepadPlusPlus. |
Then restart, and it will be removed - just don't right click in explorer, since that will trigger the reinstall. |
Thank you, it really worked! Notepad wasn’t the only package causing issues. If someone else encounter problems with residual Appx packages, follow these steps to ensure complete removal:
|
This issue is also present in Windows Server 2025. We use chocolatey & packer so restarting before the sysprep resolved it along with the Remove-AppxPackage call.
|
Could we maybe get a command line switch for the installer to disable the installation of AppxPackage? |
SYSPRP Package NotepadPlusPlus_1.0.0.0_neutral__7njy0v32s6xk6 was installed for a user, but not provisioned for all users.
https://community.notepad-plus-plus.org/topic/24345/notepad-v8-5-2-release/19?_=1681357704510
Not sure if it’s NppShell issue though.
What do you think @GurliGebis ?
The text was updated successfully, but these errors were encountered: