-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 Restructure folders and update scripts.
Add a Setup Flow Launcher script.
- Loading branch information
1 parent
5ca3100
commit 802ef77
Showing
15 changed files
with
265 additions
and
403 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Write-Host "Disabling Virtualization-based security..." | ||
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HyperVVirtualizationBasedSecurityOptOut" -Type DWord -Value 1 | Out-Null # Undocumented reg to opt out from Hyper-V based VBS | ||
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Type DWord -Value 0 | Out-Null # Disables VBS | ||
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Type DWord -Value 0 | Out-Null # Core isolation switch | ||
Write-Host "Disabled Virtualization-based security." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Write-Host "Enabling Virtualization-based security..." | ||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Type DWord -Value 1 | ||
bcdedit.exe /set hypervisorlaunchtype auto | Out-Null | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Write-Host "Enabling Virtualization-based security..." | ||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HyperVVirtualizationBasedSecurityOptOut" | ||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" | ||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Type DWord -Value 1 | ||
Write-Host "Enabled Virtualization-based security." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Function space { | ||
Write-Host " " | ||
} | ||
|
||
Function print($text) { | ||
Write-Host $text | ||
} | ||
|
||
if ($CurrentBuild -lt 22000) { | ||
print "Enabling Windows Subsystem for Linux..." | ||
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Windows-Subsystem-Linux" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
Enable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
if (Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -like "Enterprise*" -or $_.Edition -eq "Education" -or $_.Edition -eq "Professional"}) { | ||
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
} | ||
else { | ||
$ProductName = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName | ||
print "Could not enable Hyper-V since $ProductName does not support it." | ||
} | ||
print "Enabled Windows Subsystem for Linux." | ||
} | ||
elseif ($CurrentBuild -ge 22000) { | ||
print "Enabling Windows Subsystem for Linux version 2 along with GUI App support..." | ||
wsl --install | Out-Null | ||
print "Enabled Windows Subsystem for Linux." | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
if ($CurrentBuild -lt 22000) { | ||
Write-Host "Enabling Windows Subsystem for Linux..." | ||
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Windows-Subsystem-Linux" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
Enable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
if (Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -like "Enterprise*" -or $_.Edition -eq "Education" -or $_.Edition -eq "Professional"}) { | ||
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V" -Online -All -NoRestart -WarningAction Ignore | Out-Null | ||
} | ||
else { | ||
$ProductName = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName | ||
Write-Host "Could not enable Hyper-V since $ProductName does not support it." | ||
} | ||
Write-Host "Enabled Windows Subsystem for Linux." | ||
} | ||
elseif ($CurrentBuild -ge 22000) { | ||
Write-Host "Enabling Windows Subsystem for Linux version 2 along with GUI App support..." | ||
wsl --install | Out-Null | ||
Write-Host "Enabled Windows Subsystem for Linux." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#Scripts | ||
|
||
Scripts for popular functions so that you can run them without having to go through the entire WinRice experience. | ||
|
||
To run any script, copy and paste the command into Windows Terminal (Admin). | ||
|
||
## Winstall | ||
|
||
Installs apps you pre-list in a text file. [Learn more](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winstall.md). | ||
|
||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/Winstall.ps1')) | ||
``` | ||
|
||
|
||
## Winget Import | ||
|
||
Imports apps from a pre-populated JSON file generated using `winget export` in your older device or previous installation of Windows. [Learn more](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/import.md). | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/WingetImport.ps1')) | ||
``` | ||
|
||
|
||
## Flow Launcher | ||
|
||
Installs [Flow Launcher](https://flowlauncher.com), configures core plugins and installs onsetGlaze acrylic theme. | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/SetupFlowLauncher.ps1')) | ||
``` | ||
|
||
|
||
## Windows Subsystem for Linux | ||
|
||
### Enable | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/EnableWSL.ps1')) | ||
``` | ||
|
||
|
||
## Virtualization-based security | ||
|
||
### Enable | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/EnableVBS.ps1')) | ||
``` | ||
|
||
### Disable | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/DisableVBS.ps1')) | ||
``` | ||
|
||
|
||
## Windows Update | ||
|
||
### Setup Policies ([see policies](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#%EF%B8%8F-windows-update)) | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/SetupWU.ps1')) | ||
``` | ||
|
||
### Restore Default Policies | ||
|
||
```powershell | ||
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/ResetWU.ps1')) | ||
``` | ||
|
||
|
||
--- | ||
|
||
|
||
## Feedback | ||
|
||
If you have observed an issue with docs or if there are accessibility issues, please consider [filing an issue](https://github.com/pratyakshm/WinRice/issues/new?assignees=pratyakshm&labels=Issue-Docs&template=doc_issue.yaml&title=Docs+issue%3A+). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse | ||
# This file is a part of the WinRice software | ||
# Copyright (c) 2020-2024 Pratyaksh Mehrotra <[email protected]> | ||
# All rights reserved. | ||
|
||
Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse | ||
Write-Host "Windows Update settings have been reset." |
Oops, something went wrong.
802ef77
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.
@check-spelling-bot Report
🔴 Please review
See the 📜action log or 📝 job summary for details.
Unrecognized words (4)
afbb
ccd
flowlauncher
NBLGGH
Previously acknowledged words that are now absent
bcdedit ecd hypervisorlaunchtype ization Minecraft nblggh nns OZr protonmail pwd ssign winrice WSA 🫥To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands
... in a clone of the [email protected]:pratyakshm/WinRice.git repository
on the
main
branch (ℹ️ how do I use this?):Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary
This includes both expected items (273) from .github/actions/spelling/expect.txt and unrecognized words (4)
Consider adding them (in
.github/workflows/spelling.yml
) foruses: check-spelling/check-spelling@main
in itswith
:To stop checking additional dictionaries, add (in
.github/workflows/spelling.yml
) foruses: check-spelling/check-spelling@main
in itswith
:Errors (1)
See the 📜action log or 📝 job summary for details.
See ❌ Event descriptions for more information.
If the flagged items are false positives
If items relate to a ...
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txt
file matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^
refers to the file's path from the root of the repository, so^README\.md$
would exclude README.md (on whichever branch you're using).well-formed pattern.
If you can write a pattern that would match it,
try adding it to the
patterns.txt
file.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.