-
-
Notifications
You must be signed in to change notification settings - Fork 963
Fix with oscdimg.exe search, ExecutionPolicy, compression, etc.. #319
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
base: main
Are you sure you want to change the base?
Conversation
- Edit README.md part for `Set-ExecutionPolicy` to use `-Scope Process` to prevent changing the entire computer's policy. - Fix tiny11maker.ps1 and tiny11Coremaker.ps1 to find oscdimg.exe from registry instead of using fixed path. - Add Run.bat helper batch file(referenced from Win11Debloat) to help running tiny11maker with double clicking.
Although it is stated that this project is open-source, it would be nice to add the license(MIT, BSD, Apache 2.0) file as the github document says However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you've chosen not to license this project for some reason, I respect that decision 😊. |
- Add AllSigned, Undefined for consideration which also prevent script from running
# Check if PowerShell execution is restricted | ||
if ((Get-ExecutionPolicy) -eq 'Restricted') { | ||
Write-Host "Your current PowerShell Execution Policy is set to Restricted, which prevents scripts from running. Do you want to change it to RemoteSigned? (yes/no)" | ||
# Check if PowerShell execution is Restricted or AllSigned or Undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious if this part is actually called, is this for some possible cases where the user tries to run it from powershell they have been using for different activity which could have set ExecutionPolicy to the value that does not allow script to run? I think in normal cases, the user will run it with from the powershell which have the ExecutionPolicy that allow to run custom scripts, and it is inherited, which make it will never be the ones that need to be changed for elevation.
b6c11dc
to
399cddd
Compare
- fix the cause of crash if ADK is not installed
399cddd
to
e1273fe
Compare
- Get architecture using Get-WindowsImage and its property directly. - Use Get-AppxProvisionedPackage and Remove-AppxProvisionedPackage instead if dism for more consistence. - Use Export-WindowsImage with -CompressionType Maximum instead of Fast for smaller type(used to be recovery with dism.exe).
- align switch block
- Revert to use dism for exporting install.esd to use recovery compression which reduced the size about 1 gigabytes. - Add outlook provisioned appxpackage for removal.
- revert packagePrefixed change as the package is already in github.com/ntdevlabs/pull/253
f48d4e0
to
688458d
Compare
- registry value from WOW6432Node is regarded first for setup
this definetly should be merged, at least it works now with the reg and removal of software |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further comments
Run.bat
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fix with oscdimg.exe search, ExecutionPolicy, compression, etc.. ntdevlabs#319 ntdevlabs#319
Fix with oscdimg.exe search, ExecutionPolicy, compression, etc.. ntdevlabs#319 ntdevlabs#319
Fix with oscdimg.exe search, ExecutionPolicy, compression, etc.. ntdevlabs#319 ntdevlabs#319
Fix with oscdimg.exe search, ExecutionPolicy, compression, etc.. ntdevlabs#319 ntdevlabs#319
I would vote for accepting this PR, a lot of great small cleanups. |
- fix (noted in ntdevlabs#339) by adding ':' colon for validation pattern, which used to be set to empty value(resulting in using script root path) - use `Export-WindowsImage` with undocumented Compression Type for more consistence - use direct string check for little performance improvement
Remove-Item -Path "$ScratchDisk\tiny11\sources\install.wim" -Force | Out-Null | ||
Rename-Item -Path "$ScratchDisk\tiny11\sources\install2.wim" -NewName "install.wim" | Out-Null | ||
# Run `Export-WindowsImage` with undocumented CompressionType "LZMS" (which is the same compression used for Recovery from dism.exe) | ||
Export-WindowsImage -SourceImagePath "$ScratchDisk\tiny11\sources\install.wim" -SourceIndex "$index" -DestinationImagePath "$ScratchDisk\tiny11\sources\install2.wim" -CompressionType "LZMS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it is said that Compressiontype Recovery is not supported with PShell, actually Export-WindowsImage
used to support the same compression algorithm used for Recovery from Windows 10(it internally uses WIMExportFile, which used to support LZMS compression) and it even works with .wim extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been noted in comments that Export Image doesn't support compress which is really odd.
Thanks for your improvements. Unfortunately there are many open PRs that would conflict with your PR.
I hope that the owner can find some time to find a clean way to merge all pending PRs, each of them have unique improvements.
Set-ExecutionPolicy
to use-Scope Process
to prevent changing the entire computer's policy.