Hence why I use the word "optimize" and "optimizations" primarily when referring to images I create and why I've harped about the force removal of Component Packages for months. 99.9% of removals are completely unnecessary but some people aim for these tiny "Wimboot-like" Wim files like they get a medal for the smallest system image.
That's why I said it would be very unlucky. Before continuing with the tweaks it would be better to find out the cause of this otherwise you will be walking in circles without leaving the place.
ISO/WIM to UUP working. Anyone who wants to know the working parameters, knock yourself out. Code: [DllImport("Wimgapi.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "CreateUUP")] internal static extern IntPtr GetCurrentProcess(); if (MarshalAs(UnmanagedType.Bool)); throw ex; CreateUUP( [In, MarshalAs(UnmanagedType.WIMStr)] string WimFile, [In] UUPCreateDesiredAccess DesiredAccess, [In] UUPCompressionType CompressionType, [Out, Optional] out UUPCreationResult CreationResult );
@GodHand It would be better if you create a new thread in Coding Life sub-forum, cause the discussions are going to deviate too much from the original topic.
I'm well aware, but at the time I was entertained at the presumption a handful of people had in that things require an array of 3rd party tools when, in fact, significantly more can be done with no 3rd party tools and a little patience. But in any case, it won't too long before I post the primary PShell project for offline optimizing on GitHub and PowerShellGet, and likewise, release it on here. And yeah I will make its own thread for it. I appreciate the cordial response, in any case.
There is no need to remove Snipping Tool from the image when you can completely disable it system-wide via Group Policy: Click Start, type gpedit.msc, open Local Group Policy Navigate to Computer Configuration->Administrative Templates->Windows Components->Tablet PC->Accessories double click "Do not allow Snipping Tool to run." Select "Enabled" Click "OK." You can also do it by editing its specific offline registry hive subkey, removing the link from its default directory and removing the Desktop.ini string associated with said .lnk in ProgramData > > > Accessories Spoiler Code: If (Test-Path -Path "$Mount\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Snipping Tool.lnk") { Remove-Item -Path "$Mount\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Snipping Tool.lnk" -Force } #Test if the Link exists, and remove it if so. Else { Break } # If it does not exist, the code-block breaks and does not proceed. $LnkINI = "$Mount\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\desktop.ini" # Assign the Desktop.ini to a variable. $SnippingLnk = "Snipping Tool.lnk=@%SystemRoot%\system32\SnippingTool.exe,-15051" # Assign the string you want to remove to a variable. $LnkContent = (Get-Content -Path $LnkINI) # Get the content of the INI file, and save the content to a variable so it can be searched for the string you want to remove. If ((Select-String -InputObject $LnkContent -Pattern $SnippingLnk -SimpleMatch -Quiet) -eq $true) # Search the string using the variables that have been assigned above it. The -Quiet flag returns a bool result ($true, $false) as opposed to ouputting the entire content of the file, hence why it requires the search to -eq (equal) $true. { If ((([IO.FileInfo]$LnkINI).Attributes -match "Hidden" -and "System")) { ATTRIB -S -H $LnkINI } # Removes the System and Hidden security attributes on the ini so it can be edited. (Get-Content -Path $LnkINI) | Where { $_ -ne $SnippingLnk } | Set-Content -Path $LnkINI -Force # The content of the ini is retrieved, piped to the Where cmdlet where it looks for every line ($_) that does NOT equal the variable containing the Snipping Tool string, and then sets the content with the Snipping Tool string omitted. ATTRIB +S +H $LnkINI # Resets the security attrubutes } I made this long so you could see verbatim everything that's done in sequence. You can shrink this down into 2 lines if you wanted. Or...do it using Group Policy. Mind you removing certain links (Snipping, Steps Recorder, etc.) will not stick, as they are automatically replaced if you run SFC /SCANNOW. So yeah, just use GPEdit.
Thanks, it's easy for me if I follow the Group Policy guide, although what I really wanted was to remove it and not disable it (if I wanted that I'd disable more things instead of removing them). So, there's no way to remove some apps from the start menu like the Windos Defender Security Center, Photos app and Mixed Reality Portal even if they can't be removed without a clean install? I've already deleted the content of the TileDataLayer folder and it didn't work.
Do you want to remove the shortcut or the entire component? Windows Defender is complicated to remove on RS2/RS3 because it does not reside in a single package. Edit: Anyway MSMG Toolkit can only remove packages of images offline so if you want help in that do not ask in that topic because anything that does not have the word MSMG written irritates some people with problems of text interpretation and common sense.
Defender can be removed from a live system using process privileges and fairly simple functions. This is not something I would ever personally do but I have done it up to the latest Insider Update on VMs for testing purposes. Install_WIM_Tweak will remove the component packages, but will leave visibility settings, registry values and even non-working links across the system. I would not recommend removing Defender using that; you need to use something that does the most thorough job possible for an online system. I have never tried NTLite but know the APIs and wrappers it uses, and it, too, has the ability (as stated) to remove it fairly well; however, NTLite does not commit all the final registry values post-removal nor does it recursively remove all hard-links and symbolic-links to Defender, its services, SecHealthUI, etc.
Snipping Tool is just a very small program in your System32 folder. If you remove it from there, and use the guide I posted to remove its link and string data, it's "deleted." You can also set its registry key to '0' as well, but like I said, the removal of programs in the Accessories directory will be flagged as repairable corruption, and running SFC /SCANNOW will replace them.
Could you give us an example code? Is it just using Powershell or is it something more complex using APIs or C#?
Can not right-click and remove the shortcut? Edit: To remove content online look for another thread or create one but you can easily find how to remove apps online if you search on google.
But I was talking about the live install and RS3 (and the paid version). No, I can't. If I click them I'm redirected to the settings app.