-
-
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.
Added a Setup Flow Launcher script
- Loading branch information
1 parent
5ca3100
commit ccea48c
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 | ||
|
||
I've created seperate 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). | ||
|
||
## Deployment | ||
|
||
### 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')) | ||
``` | ||
|
||
|
||
|
||
## OS | ||
|
||
### 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.