.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Features •
12 | Documentation •
13 | FAQ •
14 | License •
15 | Contribution
16 |
17 |
18 | ## About
19 |
20 | WinRice is a PowerShell script designed to automate setting up a new Windows device. It automates a few of the useful things that people generally do in a fresh Windows installation or a new Windows device.
21 |
22 | [
](https://github.com/pratyakshm/WinRice/releases/download/v0.5.04112021/WinRice.exe)
23 |
24 |
25 | ## Feature Highlight
26 |
27 | - Batch installs apps and features automatically
28 | - Configures Windows UI
29 | - Configures Windows Update policies
30 | - Enhances privacy
31 | - Disables non-essential tasks
32 | - Disables silent installation of apps from Microsoft Store
33 | - Disables suggestions and tips
34 | - Exposes hidden power options
35 | - Hardens security
36 | - Removes non-essential apps
37 | - Removes non-essential features
38 |
39 | ## Pre-requisites
40 |
41 | - You've read the documentation. If you're running WinRice for the first time, take a look at [`Main-brief.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md). The directory that contains all documents is available [here](https://github.com/pratyakshm/WinRice/tree/main/doc).
42 | - Your device must:
43 | - Be connected to the Internet.
44 | - Be powered by an [in-service Windows version](https://github.com/pratyakshm/WinRice/blob/main/doc/Supported-winver.md).
45 | - Not have any pending restarts.
46 | - Be up to date. \*
47 |
48 | \* If you've just installed Windows, please ensure that all updates from Microsoft Store and Windows Update are installed. This is because WinRice uses some components that are only available in the latest updates. This is to ensure that WinRice works seamlessly on your device.
49 |
50 | ## Testimonials
51 | > 
52 | > \- KenHV ([@KenHV](https://github.com/KenHV)) (July 11th, 2021)
53 |
54 | WinRice is fully free and open source. If you wish to support my work, you may [pledge via PayPal](https://paypal.me/pratyakshm).
55 |
56 | Made with 🩷 on 🌍.
57 |
58 | Thank you for using WinRice.
59 |
60 |
73 |
--------------------------------------------------------------------------------
/doc/App-uninstallation.md:
--------------------------------------------------------------------------------
1 | # App Uninstallation
2 |
3 | WinRice can uninstall non-essential apps that come bundled with Windows.
4 | The user is asked if they want to uninstall such apps. If they choose to do so, they are presented with an option to choose which apps to uninstall.
5 | If the user chooses to uninstall apps but doesn't specify which apps to uninstall, the following apps will be uninstalled:
6 |
7 | - Calendar
8 | - Clipchamp
9 | - Cortana
10 | - Camera (if no camera is detected)
11 | - Mail
12 | - Maps
13 | - Microsoft OneDrive
14 | - Microsoft News
15 | - Microsoft Solitaire Collection
16 | - Microsoft Teams
17 | - Mixed Reality Portal
18 | - OneNote for Windows 10
19 | - Office
20 | - Paint 3D
21 | - Power Automate Desktop
22 | - Tips
23 | - Whiteboard
24 | - Weather
25 |
26 | ## Uninstall Apps From a Text File
27 |
28 | WinRice supports uninstalling a list of apps from a text file.
29 | The text file must be formatted as follows:
30 |
31 | - There must be one app name per line.
32 | - Absolute package name shall be used. Example: `Microsoft.WindowsMaps`
33 | - The filename must be `uninstallapps.txt`.
34 | - List must be saved in the same folder as WinRice.
35 |
36 | If an `uninstallapps.txt` file is detected, WinRice won't ask if the user wants to select which apps to uninstall. The list will be used automatically.
37 |
38 | **Note:** To get package name of an app, use `Get-AppxPackage *app*`.
39 |
40 | ---
41 |
42 | ## Feedback
43 |
44 | 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+).
45 |
--------------------------------------------------------------------------------
/doc/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution
2 |
3 | WinRice accepts all kinds of contributions such as finding bugs, fixing bugs, adding features, removal of deprecated features and/or values, improving documentation, etc. I'm excited to work with the users and fellow PowerShell enthusiasts to further improve this project.
4 |
5 | I ask that **before you start your work on a feature that you would like to request or contribute**, please read the WinRice principles below. I will be happy to work with you to figure out good approaches and provide guidance throughout feature development, and help avoid any wasted or duplicated effort.
6 |
7 | ## Principles
8 |
9 | 1. Prefer usage of first party software over third party software (instance: WinGet over Chocolatey, etc.).
10 | 2. Avoid removing software which is tied to the operating system (e.g. Microsoft Edge).
11 | 3. Avoid removing unrecoverable software.
12 | 4. Avoid removing developer category inbox apps (e.g. Windows Terminal).
13 | 5. Avoid removing media playback apps (e.g. Media Player, Movies & TV, Photos, etc.).
14 | 6. Avoid removing Xbox sister apps (e.g. Xbox Game bar, etc.).
15 | 7. Avoid removing software that can result in reduced crucial OS and app functionality
16 | 8. Avoid modifying settings or files that may conflict with OS updates.
17 | 9. Avoid making changes that might result in a degraded OS security and/or stability.
18 | 10. Avoid adding registry edits that no longer take effect in [currently serviced Windows 11/10 versions](https://docs.microsoft.com/en-us/windows/release-health/release-information).
19 |
20 | # Credits and acknowledgements
21 | • WinRice logo and banner is created by Vancel
22 | • Documentation and UX are contributed to by Ken
--------------------------------------------------------------------------------
/doc/Frequently-answered-questions.md:
--------------------------------------------------------------------------------
1 | # Frequently Asked Questions
2 |
3 | **Q:** **Is it safe to use WinRice?**
4 | **A:** Yes, given that you've _read the documentation_.
5 |
6 | **Q:** **Where can I read the detailed documentation for WinRice?**
7 | **A:** If you are a user and you want to learn what WinRice does, refer to [`Main-brief.md`](https://github.com/WinRice/WinRice/blob/main/doc/Main-brief.md).
8 | All documentation for this program is contained in the [doc](https://github.com/pratyakshm/WinRice/tree/main/doc) folder.
9 |
10 | **Q:** **How do I revert a change?**
11 | **A:** Read [`Reverting-changes.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Reverting-changes.md).
12 |
13 | **Q:** **I've run WinRice and I observed an issue.**
14 | **A:** [Open a ticket](https://github.com/pratyakshm/WinRice/issues/new/choose).
15 |
16 | **Q:** **Please add <feature> to WinRice**
17 | **A:** Submit a [Pull request](https://github.com/pratyakshm/WinRice/pulls) with your code or [open a ticket](https://github.com/pratyakshm/WinRice/issues). As long as it follows the WinRice [principles](https://github.com/pratyakshm/WinRice/blob/main/doc/CONTRIBUTING.md#principles) and adds value, I will most likely make it happen.
18 |
19 | **Q:** **Which OS versions does WinRice support?**
20 | **A:** Refer to [doc/Supported-winver.md](https://github.com/pratyakshm/WinRice/blob/main/doc/Supported-winver.md).
21 |
22 | **Q:** **I opted to turn off automatic Windows updates, but they're not turned off. Why?**
23 | **A:** Windows Update policies are only applied to Windows editions that support Group policies. These are Education, Enterprise, Enterprise LTSC and Professional editions. Windows editions that are derivates of Windows Core edition (for instance, Windows 11/10 Home) do not support Group policies, hence Windows Update policies cannot be applied to them.
24 | If WinRice has not set up group policies despite your edition of Windows supporting it, please consider filing a [bug report](https://github.com/pratyakshm/WinRice/issues/new?assignees=pratyakshm&labels=Issue-Bug&template=bug_report.yaml&title=Bug%3A+).
25 |
26 | ---
27 |
28 | ## Feedback
29 |
30 | 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+).
31 |
--------------------------------------------------------------------------------
/doc/Main-brief.md:
--------------------------------------------------------------------------------
1 | # Main brief document
2 |
3 | 💡 Your WinRice experience can be customized. Please read [`Settings.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Settings.md) to learn more.
4 |
5 | ## Contents of this page
6 |
7 | | Category | Link |
8 | | ---------------- | ------------------------------------------------------------------------------------------------ |
9 | | Apps | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#apps) |
10 | | Features | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#features) |
11 | | Privacy | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#privacy) |
12 | | Security | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#security) |
13 | | OS | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#os) |
14 | | Windows Explorer | [Click here](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#windows-explorer) |
15 |
16 | ## Legend
17 |
18 | | Symbol | Significance |
19 | | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
20 | | 🎛️ | Tasks prefixed with 🎛️ "control knob" emoji are such tasks which are only run when they are configured. You may learn more by visiting [`Settings.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Settings.md). |
21 | | 🧪 | Tasks prefixed with 🧪 "test tube" emoji behave differently when device is detected to be flighting in the Windows Insider Program. |
22 |
23 | # Apps
24 |
25 | ### Things Installed:
26 |
27 | - HEVC Video Extensions
28 |
29 | - Visual C++ Libraries
30 |
31 | - Windows Package Manager ([GitHub](https://github.com/microsoft/winget-cli/))
32 |
33 | #### 🎛️ Leveraging WinGet to Install Apps
34 |
35 | - [`winget.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winget.md)
36 |
37 | - [`import.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/import.md)
38 |
39 | - [`winstall.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winstall.md)
40 |
41 | ### 🎛️ Apps Uninstalled:
42 |
43 | Refer to [`App-uninstallation.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/App-uninstallation.md)
44 |
45 | ### Apps Unpinned From Taskbar:
46 |
47 | - Mail
48 | - Microsoft Store
49 | - Office
50 | - Xbox
51 |
52 | ## 🔚 End of Apps section
53 |
54 | ---
55 |
56 | # Features
57 |
58 | ### 🎛️ Features Installed:
59 |
60 | - .NET 3.5
61 | - Windows Sandbox
62 | - Windows Subsystem for Linux
63 |
64 | ### 🎛️ Features Uninstalled:
65 |
66 | - DirectPlay
67 | - Legacy Components
68 | - Math Recognizer
69 | - SMB 1 Protocol
70 | - SMB Direct
71 | - Snipping Tool (Windows 10)
72 | - Windows Fax & Scan
73 | - Windows Hello Face (if no Camera is connected to device)
74 | - Windows PowerShell ISE
75 | - Windows PowerShell v2
76 | - Windows XPS Features
77 | - XPS Document Writer
78 | - WordPad
79 | - Work Folders Client
80 |
81 | ## 🔚 End of Features section
82 |
83 | ---
84 |
85 | # Privacy
86 |
87 | ## Turn Off the Following:
88 |
89 | - Advertising ID
90 | - App suggestions
91 | - Error reporting
92 | - Inking & typing personalization
93 | - Online speech recognition
94 | - Tailored Experiences
95 | - Websites' access to language list to provide locally relevant content
96 |
97 | ## Limit The Following:
98 |
99 | - 🧪 Diagnostic data
100 | - 🧪 Feedback notifications
101 |
102 | #### 🔔 Check [notes](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#notes)
103 |
104 | ## Turn On the Following:
105 |
106 | - Clipboard history
107 |
108 |
109 | ## 🔚 End of Privacy section
110 |
111 | ---
112 |
113 | # Security
114 |
115 | ### Stay on lock screen post a Windows Update restart
116 |
117 | After a device restarts after applying a Windows Update, it stays on the lock screen and awaits manual login from a user.
118 |
119 |
128 |
129 | ### Windows WDigest Credential Caching
130 |
131 | Digest Authentication is a challenge/response protocol that was primarily used in Windows Server 2003 for LDAP and web-based authentication. It utilizes Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) exchanges to authenticate.
132 |
133 | This is where WDigest comes into play, something to be concerned with related to WDigest is that it stores passwords in clear-text, in memory. If a malicious user has access to an endpoint and is able to run a tool like Mimikatz, not only would they get the hashes currently stored in memory, but they’d also be able to get the clear-text password for the accounts as well.
134 |
135 | WinRice disables WDigest Credential Caching on all devices.
136 |
137 | See more at [What is Digest Authentication?: Logon and Authentication - docs.microsoft.com]().
138 |
139 | ### Link-Local Multicast Name Resolution
140 |
141 | LLMNR was (is) a protocol used that allowed name resolution without the requirement of a DNS server. It was (is) able to provide a hostname-to-IP based off a multicast packet sent across the network asking all listening Network-Interfaces to reply if they are authoritatively known as the hostname in the query.
142 | Windows will use LLMNR in certain circumstances to identify certain machines on the network, such as file-servers. If Windows attempts to use LLMNR to identify the server of a file-share and it receives a reply, it will send the current user’s credentials directly to that server assuming it wouldn’t have replied if it wasn’t the authoritative file-server. If that LLMNR received response was actually an impersonator, Windows just disclosed that user’s credential hash to a third-party. What’s worse? The impersonator may forward that packet to the actual file-server, so the user never realizes anything is amiss.
143 |
144 | WinRice disables LLMNR on all devices.
145 |
146 | See more at [How to Disable LLMNR & Why You Want To - Black Hills Information Security - blackhillsinfosec.com](https://www.blackhillsinfosec.com/how-to-disable-llmnr-why-you-want-to/).
147 |
148 | ### Structured Exception Handling Overwrite Protection
149 |
150 | This feature is designed to block exploits that use the Structured Exception Handler (SEH) overwrite technique. This protection mechanism is provided at run-time. Therefore, it helps protect your device.
151 |
152 | WinRice enables Structured Exception Handling Overwrite Protection on all devices.
153 |
154 | See more at [How to enable Structured Exception Handling Overwrite Protection (SEHOP) in Windows operating systems - support.microsoft.com](https://support.microsoft.com/en-us/topic/how-to-enable-structured-exception-handling-overwrite-protection-sehop-in-windows-operating-systems-8d4595f7-827f-72ee-8c34-fa8e0fe7b915).
155 |
156 | ### Web Proxy Auto-Discovery
157 |
158 | WPAD is a protocol, developed in 1999 by people from Microsoft and other technology companies, that allows computers to automatically discover which web proxy they should use. The proxy is defined in a JavaScript file called a proxy auto-config (PAC) file.
159 |
160 | The location of PAC files can be discovered through WPAD in several ways: through a special Dynamic Host Configuration Protocol (DHCP) option, through local Domain Name System (DNS) lookups, or through Link-Local Multicast Name Resolution (LLMNR).
161 |
162 | Attackers can abuse these options to supply computers on a local network with a PAC file that specifies a rogue web proxy under their control. This can be done on an open wireless network or if the attackers compromise a router or access point.
163 |
164 | WinRice disables Web Proxy Auto-Discovery or WPAD on all devices.
165 |
166 | See more at [Disable WPAD now or have your accounts and private data compromised - csoonline.com](https://www.csoonline.com/article/3106076/disable-wpad-now-or-have-your-accounts-and-private-data-compromised.html).
167 |
168 | Also read: [Disable WPAD on Your PC So Your HTTPS Traffic Won't Be Vulnerable to the Latest SSL Attack -null-byte.wonderhowto.com](https://null-byte.wonderhowto.com/how-to/disable-wpad-your-pc-so-your-https-traffic-wont-be-vulnerable-latest-ssl-attack-0172499).
169 |
170 | ### Local Security Authority (LSA) Protection
171 |
172 | The LSA, which includes the Local Security Authority Server Service (LSASS) process, validates users for local and remote sign-ins and enforces local security policies. The Windows 8.1 operating system provides additional protection for the LSA to prevent reading memory and code injection by non-protected processes. This provides added security for the credentials that the LSA stores and manages.
173 |
174 | WinRice enables LSA Protection on all devices.
175 |
176 | See more at [Configuring Additional LSA Protection](https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection).
177 |
178 | ### Windows Script Host
179 |
180 | Numerous spam campaigns are pushing various crypto-ransomware families (and backdoors) via ZIP file attachments. And such ZIP files typically contain a JScript (.js/.jse) file which, if clicked, will be run via Windows Script Host.
181 |
182 | Since Windows Script Host is also not used by personal PC users, WinRice disables this feature.
183 |
184 | See more at [How-To Disable Windows Script Host - blog.f-secure.com](https://blog.f-secure.com/how-to-disable-windows-script-host/).
185 |
186 | ### Office OLE
187 |
188 | OLE allows an editing application to export part of a document to another editing application and then import it with additional content. For example, a desktop publishing system might send some text to a word processor or a picture to a bitmap editor using OLE.
189 | OLE is misused by malware and is often treated by some as an exploit.
190 |
191 | WinRice disables Office OLE.
192 |
193 | See more at [111 Attacking EvilCorp Anatomy of a Corporate Hack Sean Metcalf Will Schroeder - youtube.com](https://youtu.be/nJSMJyRNvlM?).
194 |
195 | ## 🔚 End of Security section
196 |
197 | ---
198 |
199 | # OS
200 |
201 | ## Disables the following tasks:
202 |
203 | - Consolidator
204 | - DmClient
205 | - DmClientOnScenarioDownload
206 | - Disk Diagnostics Data Collector
207 | - Feedback Notifications task
208 | - Microsoft Compatibility Appraiser
209 | - ProgramDataUpdater
210 | - QueueReporting
211 | - UsbCeip
212 |
213 | ### Disables these additional tasks if your device is powered by an AMD processor:
214 |
215 | - AMDLinkUpdate
216 | - AMDRyzenMasterSDKTask
217 | - ModifyLinkUpdate
218 | - StartCN
219 | - StartDVR
220 |
221 | ## Restores Power options
222 |
223 | This is useful for OEM devices which ship with a lot of power options hidden by default. WinRice restores them to the user.
224 |
225 | Screen shot of Advanced power settings applet
226 |
227 | 
228 |
229 |
230 |
231 | ### More OS Level Changes That Are Made:
232 |
233 | Things disabled:
234 |
235 | - Autoplay & Autorun.
236 | - Hibernation (desktop only).
237 | - Windows welcome experience after an update which shows what's new.
238 | - Tips and suggestions when using Windows.
239 |
240 | Things enabled:
241 |
242 | - 🎛️ OS may be enabled to follow UTC if its set to follow BIOS time.
243 | - Num lock on startup.
244 | - Long path support.
245 |
246 | ## 🧪🎛️ Windows Update
247 |
248 | ### Setup Windows Update
249 |
250 | Setup the following policies to Windows Update:
251 |
252 | - Turn off automatic updates
253 | - Do not auto restart PC if users are signed in
254 | - Delay feature updates by 20 days
255 | - Delay quality updates by 4 days
256 | - Turn off re-installation of bloatware after feature updates
257 | - Turn off Delivery Optimization
258 |
259 | ### Reset Windows Update
260 |
261 | - Reset Windows Update is available for users who want to switch back to stock Windows Update settings.
262 |
263 | ## 🔚 End of OS section
264 |
265 | ---
266 |
267 | # Windows Explorer
268 |
269 | ## Turn Off the Following:
270 |
271 | | Item | Area Affected | OS |
272 | | ------------------ | ----------------------- | ----------------- |
273 | | Widgets icon | Taskbar | Windows 11 |
274 | | Chat icon | Taskbar | Windows 11 |
275 | | Search icon | Taskbar | Windows 11 and 10 |
276 | | Task view | Taskbar | Windows 11 and 10 |
277 | | Cortana | Taskbar | Windows 10 |
278 | | 3D Objects | File Explorer sidebar | Windows 10 |
279 | | Meet now | Other system tray icons | Windows 10 |
280 | | News and interests | Other system tray icons | Windows 10 |
281 |
282 |
283 |
284 | ## More Changes:
285 |
286 | - Set File Explorer to open This PC by default.
287 | - Turn off Keyboard shortcut for Sticky keys.
288 | - If ShareX is installed, WinRice disables the Print Screen key behavior of launching the Snipping Tool.
289 | - If the taskbar is detected to have incorrect window preview behavior for opened apps, an attempt is made to fix it.
290 |
291 |
292 | ## 🔚 End of Windows Explorer section
293 |
294 | ---
295 |
296 | ## Notes
297 |
298 | - WinRice sets your Diagnostic data to Required level. On devices running Windows pre-release software, Diagnostic data is set to Optional level.
299 |
300 | - Error reporting is not disabled in Windows pre-release software.
301 |
302 | - Feedback notifications are not disabled in Windows pre-release software.
303 |
304 | - Windows Update policies are not applied in Windows pre-release software.
305 |
306 | - Windows Update policies are only applied to Windows editions that support Group policies. These are Education, Enterprise, Enterprise LTSC and Professional editions. Windows editions that are derivates of Windows Core edition (for instance, Windows 11 / 10 Home) do not support Group policies, and as a result Windows Update policies cannot be applied to them.
307 |
308 | ---
309 |
310 | ## Feedback
311 |
312 | 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+).
313 |
--------------------------------------------------------------------------------
/doc/README.md:
--------------------------------------------------------------------------------
1 | # Notes
2 |
3 | This folder contains documentation for users.
4 |
5 | If you are going to start using WinRice, [`main-brief.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md) is the document you need to read.
6 |
7 | For additional info and technical details, check out the [Wiki](https://github.com/pratyakshm/WinRice/wiki).
8 |
9 | ## Found an Issue With Docs?
10 |
11 | Report them. Report any issues you face while reading the documentation. Be it spelling mistakes, grammatical errors, or just unclear language.
12 | [Submit an issue](https://github.com/pratyakshm/WinRice/issues/new?assignees=pratyakshm&labels=Issue-Docs&template=doc_issue.yaml&title=Docs+issue%3A+), make it as detailed as possible.
13 |
14 | ## Refrain From Using WinRice if You Have NOT Read the Documentation
15 |
16 | WinRice might cause unwanted changes to your device if you have not read the docs.
17 |
18 |
--------------------------------------------------------------------------------
/doc/Reverting-changes.md:
--------------------------------------------------------------------------------
1 | # Reverting Changes
2 |
3 | ## System Restore Point
4 |
5 | WinRice provides the option for creating a System restore point before modifying the system. Restoring to the restore point will revert all settings changes performed by WinRice. However, if you configured WinRice to not create a System restore point, you may continue reading below to learn how to configure WinRice to revert its changes.
6 |
7 | ---
8 |
9 | ## Revert Changes Using WinRice Itself
10 |
11 | WinRice has a revert function for almost every function it has. For example, since WinRice has a function to disable Advertising ID, it also has a function to enable Advertising ID. Read below to learn how to make these functions work for you to revert your device to default settings.
12 |
13 | 1. [Tap here](https://github.com/pratyakshm/WinRice/archive/refs/heads/main.zip) to download the latest WinRice code from main branch.
14 |
15 | 2. Extract the ZIP file and locate `WinRice.ps1`.
16 |
17 | 3. Open this file in your desired text editor of choice.
18 |
19 | 4. Edit the function calls section by commenting functions that you do not want to run and vice-versa.
20 |
21 | For example, if you don't want the DisableAdvertisingID function to run, comment it by placing a # (pound) before the function name.
22 |
23 | On the contrary, say if you want the EnableAdvertisingID function to run, uncomment it by removing the pound before its name.
24 |
25 | 5. Save the file.
26 |
27 | 6. Open PowerShell as administrator.
28 |
29 | 7. In PowerShell, navigate to WinRice's folder (typically `~\Downloads\WinRice-main`).
30 |
31 | 8. Use command Set-ExecutionPolicy Unrestricted -Force -Scope Process to force set your ExecutionPolicy for current PSSession to Unrestricted.
32 |
33 | 9. Use ./WinRice.ps1 to execute the script.
34 |
35 | ## Re-Install Apps and Features
36 |
37 | If WinRice removed an app that you want to use, you may use the below links to re-install those app(s):
38 |
39 | Tap me to expand list
40 |
41 | - [Clipchamp](https://www.microsoft.com/store/productId/9P1J8S7CCWWT)
42 |
43 | - [Cortana](https://www.microsoft.com/store/productId/9NFFX4SZZ23L)
44 |
45 | - [Get Help](https://www.microsoft.com/store/productId/9PKDZBMV1H3T)
46 |
47 | - [Weather](https://www.microsoft.com/store/productId/9WZDNCRFJ3Q2)
48 |
49 | - [Maps](https://www.microsoft.com/store/productId/9WZDNCRDTBVB)
50 |
51 | - [Microsoft Solitaire Collection](https://www.microsoft.com/store/productId/9WZDNCRFHWD2)
52 |
53 | - [Mixed Reality Portal](https://www.microsoft.com/store/productId/9NG1H8B3ZC7M)
54 |
55 | - [Microsoft Whiteboard](https://www.microsoft.com/store/productId/9MSPC6MP8FM4)
56 |
57 | - [Mail & Calendar](https://www.microsoft.com/store/productId/9WZDNCRFHVQM)
58 |
59 | - [News](https://www.microsoft.com/store/productId/9WZDNCRFHVFW)
60 |
61 | - [Office](https://www.microsoft.com/store/productId/9WZDNCRD29V9)
62 |
63 | - [OneNote for Windows 10](https://www.microsoft.com/store/productId/9WZDNCRFHVJL)
64 |
65 | - [Paint 3D](https://www.microsoft.com/store/productId/9NBLGGH5FV99)
66 |
67 | - [Power Automate](https://www.microsoft.com/store/productId/9NFTCH6J7FHV)
68 |
69 | - [Tips](https://www.microsoft.com/store/productId/9WZDNCRDTBJJ)
70 |
71 | - [Widgets](https://www.microsoft.com/store/productId/9MSSGKG348SP)
72 |
73 |
74 |
75 | ### Notes
76 |
77 | - WinRice cannot re-pin apps that it unpinned from the Taskbar and Start menu.
78 |
79 | - WinRice cannot uninstall apps that it installed using `winget import` feature.
80 |
81 | - WinRice may uninstall apps that it installed using the Winstall feature only if you still have the original Winstall text file which contained the list of apps.
82 |
83 | ---
84 |
85 | ## Feedback
86 |
87 | 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+).
88 |
--------------------------------------------------------------------------------
/doc/Settings.md:
--------------------------------------------------------------------------------
1 | # Express Settings
2 |
3 | WinRice presents user with default settings that can be reconfigured by the user. These are called "Express Settings".
4 |
5 | There are a few configurable settings in WinRice that have a broader sense of impact on the device usage.
6 |
7 | # Uninstallation
8 |
9 | ## App Uninstallation
10 |
11 | A set of non-essential apps [listed in this document](https://github.com/pratyakshm/WinRice/blob/main/doc/App-uninstallation.md) are uninstalled from the device.
12 |
13 | ## Feature Uninstallation
14 |
15 | A set of non-essential features [listed in this part of this document](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#features-uninstalled-optional) are disabled and/or uninstalled from the device.
16 |
17 | # Installation
18 |
19 | ## App Installation
20 |
21 | No apps except HEVC Video Extensions are installed. Apps can only be installed if the user opts to use Custom Settings instead of Express Settings.
22 |
23 | ## Feature Installation
24 |
25 | No features are installed.
26 |
27 | # Windows Update
28 |
29 | Automatic Windows update is disabled.
30 |
31 | Windows quality updates are delayed by 4 days.
32 |
33 | Windows feature updates are delayed by up to 20 days.
34 |
35 | ---
36 |
37 |
38 |
39 | # Custom Settings
40 |
41 | Users can customize their WinRice experience using these Custom Settings if they do not like Express Settings.
42 |
43 | ## App Installation
44 |
45 | WinRice asks if you want to install apps. If you choose to do so, you will be presented with two methods of app installation, which are [Winstall](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winstall.md) and [WinGet import](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/import.md).
46 |
47 | ## App Uninstallation
48 |
49 | WinRice asks if you want to uninstall some built-in apps that are generally left unused. To learn more, see [App-uninstallation.md](https://github.com/pratyakshm/WinRice/blob/main/doc/App-uninstallation.md).
50 |
51 | ### Microsoft OneDrive - Uninstallation
52 |
53 | WinRice asks if you want to uninstall OneDrive.
54 |
55 | ## Feature Installation
56 |
57 | ### .NET 3.5
58 |
59 | .NET 3.5 is a legacy runtime which is used to support running legacy applications and programs. While this may prove useful in corporate environments, with some exceptions, this feature is not too important in consumer devices.
60 |
61 | By default, this feature is not installed, hence WinRice asks if you want to install it.
62 |
63 | ### Windows Subsystem for Linux
64 |
65 | The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup. Read more at [What is the Windows Subsystem for Linux? - docs.microsoft.com](https://docs.microsoft.com/en-us/windows/wsl/about).
66 |
67 | By default, this feature is not installed, hence WinRice asks if you want to install it.
68 |
69 | ### Windows Sandbox
70 |
71 | Windows Sandbox provides a lightweight desktop environment to safely run applications in isolation. Software installed inside the Windows Sandbox environment remains "sandboxed" and runs separately from the host machine. Read more at [Windows Sandbox - docs.microsoft.com](https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview).
72 |
73 | By default, this feature is not installed, hence WinRice asks if you want to install it.
74 |
75 | ## Feature Uninstallation
76 |
77 | Windows, by default, ships with optional features, some of which are no longer broadbly used in most consumer devices. Here's a list of the features: [Link](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#features-uninstalled-optional). If none of these features are useful to you, I suggest you to opt into removing them from your device.
78 |
79 | WinRice asks if you want to uninstall these features.
80 |
81 | ### Widgets - Windows 11 only
82 |
83 | Widgets at a glance is a new experience which ships with Windows 11. Learn more about them: [Stay up to date with widgets - support.microsoft.com](https://support.microsoft.com/en-us/windows/stay-up-to-date-with-widgets-7ba79aaa-dac6-4687-b460-ad16a06be6e4).
84 |
85 | Widgets is an optional experience and it can be removed. Hence, WinRice asks if you want to remove Widgets.
86 |
87 | ## Windows Update
88 |
89 | Windows Update, at least in the media, is reputed to cause more problems than offer solutions. Since 2019, however, Microsoft has begun to leverage Microsoft Cloud to use and train ML models that offer intelligent Windows Update rollouts - and it is working. Windows Update experience has globally improved for millions of devices, and there are far less adverse post update scenarios that users face at present day compared to circa 2017.
90 |
91 | While Microsoft's ML performs quite a good job in itself, WinRice still applies policies to Windows Update, if the user asks it to do so.
92 |
93 | ### List of Windows Update policies:
94 |
95 | - Disabling of automatic updates
96 | - Delaying of quality updates by 4 days and feature upgrades by 20 days
97 | - Disabling updating of Microsoft products via Windows Update
98 | - Disabling Delivery Optimization (i.e. WU will download updates only from MSFT CDN)
99 |
100 | ## System
101 |
102 | ### UTC Time
103 |
104 | If your device has Windows and Linux dual booted, its recommended to make Windows OS use UTC time when following BIOS time in order to avoid time differences with Linux.
105 |
106 | However, some reports have shown that this modification might (unintentionally) make the device not display the correct time.
107 |
108 | WinRice asks if you want to make this change.
109 |
110 | ### System Restore
111 |
112 | System Restore is a useful utility to restore your device to a previous timestamp.
113 |
114 | Since WinRice performs a good number of registry modifications to a vast amount of devices from notebooks to PCs, across different OS editions, OS versions and hardware, it might sometimes cause something unexpected to occur with your device.
115 |
116 | WinRice asks if you want to create a System restore point.
117 |
118 | ### Device-wide policies
119 |
120 | Some changes need to be applied device-wide for them to take effect. These changes apply to all current and future user accounts that will be created on your device. It is strongly recommended to agree to apply device-wide policies as well, since these policies make up much of the security hardening that WinRice performs to your device.
121 |
122 | WinRice asks if you want to apply these device-wide changes.
123 |
124 | ---
125 |
126 | #### ⚠️ Notes regarding Windows Update policies:
127 |
128 | - Windows Update policies are not applied in Windows pre-release software.
129 |
130 | - Windows Update policies are only applied to Windows editions that support Group policies. These are Education, Enterprise, Enterprise LTSC and Professional editions. Windows editions that are derivates of Windows Core edition (for instance, Windows 11/10 Home) do not support Group policies, hence Windows Update policies cannot be applied to them.
131 |
132 | ---
133 |
134 | ## Feedback
135 |
136 | 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+).
137 |
--------------------------------------------------------------------------------
/doc/Supported-winver.md:
--------------------------------------------------------------------------------
1 | # Supported Windows OS Versions
2 |
3 | WinRice supports the latest in-service versions of Windows. However, bug reports are only accepted for the two most recent in-service versions of Windows 11 and the most recent version of Windows 10.
4 |
5 | ## Check compatibility
6 |
7 | 1. Open Start menu, type "About your PC" and open the first search result.
8 |
9 | 2. Take a note of the **Version** under Windows specifications.
10 |
11 | 3. Check if the Version you have is mentioned in the **Servicing channels** table of the release information document for either [Windows 11](https://docs.microsoft.com/en-us/windows/release-health/windows11-release-information) or [Windows 10](https://docs.microsoft.com/en-us/windows/release-health/release-information), depending on which one you're using.
12 |
13 | ## Notes
14 |
15 | - When a Windows version stops receiving updates for consumer editions, WinRice also stops supporting it.
16 |
17 | - If you do not see your Version listed under the Servicing channels category for your respective OS, it means that it has likely reached end of servicing and [requires an update](https://support.microsoft.com/en-us/windows/update-windows-3c5ae7fc-9fb6-9af1-1984-b5e0412c556a).
18 |
19 | - If you wish to re-image your device (which is strongly recommended if you're on an older version or if you want the full WinRice experience), please [refer to this document](https://github.com/pratyakshm/WinRice/wiki/Fresh-installation-of-Windows).
20 |
21 | ---
22 |
23 | ## Feedback
24 |
25 | 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+).
26 |
--------------------------------------------------------------------------------
/doc/winget/import.md:
--------------------------------------------------------------------------------
1 | # WinGet Import Command
2 |
3 | Together with [`winget export`](https://docs.microsoft.com/en-us/windows/package-manager/winget/export), `winget import` can batch install apps from an exported JSON file.
4 |
5 | Dependency: [`winget`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winget.md)
6 |
7 | ## Exporting App List to JSON Using `Winget Export` Command
8 |
9 | To use `winget import`, you must use the `winget export` command first to export a JSON file consisting of apps currently installed on your device.
10 |
11 | Use the following command to export list of apps to a JSON with file name `apps.json` in `D:`:
12 | `winget export -o D:\apps.json`
13 |
14 | The partition letter, file location and file name can be changed according to user preference.
15 |
16 | ## Using `winget import` in WinRice
17 |
18 | If configured during pre-execution environment, WinRice will ask user to select the exported JSON file using File Explorer picker UI.
19 |
20 | If a **valid** JSON file is selected, WinRice will use `winget import` to batch install the apps.
21 | If an **invalid** JSON file is selected, `winget` will throw an error and WinRice will skip to the next job.
22 | If **no** JSON file is selected, WinRice will skip to the next job.
23 |
24 | ## Related Docs
25 |
26 | - [winget docs](https://docs.microsoft.com/en-us/windows/package-manager/winget/)
27 | - [winget export](https://docs.microsoft.com/en-us/windows/package-manager/winget/export)
28 | - [winget import](https://docs.microsoft.com/en-us/windows/package-manager/winget/import)
29 |
30 | ---
31 |
32 | ## Feedback
33 |
34 | 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+).
35 |
--------------------------------------------------------------------------------
/doc/winget/winget.md:
--------------------------------------------------------------------------------
1 | # Windows Package Manager CLI Client
2 |
3 | ## What is Windows Package Manager (a.k.a WinGet)?
4 |
5 | Windows Package Manager, or simply `winget`, is the official package manager client for Windows. Package managers allow you to deploy and manage apps using the command line.
6 |
7 | ## WinRice x WinGet
8 |
9 | A lot of features in WinRice are powered by WinGet.
10 |
11 | | Feature | Documentation |
12 | | ------------------------- | --------------------------------------------------------------------------------------- |
13 | | Winstall | [`winstall.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winstall.md) |
14 | | winget import | [`import.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/import.md) |
15 | | Deploy Microsoft OneDrive | [`Features.md`](https://github.com/pratyakshm/WinRice/blob/main/doc/Features.md) |
16 |
17 | # Installing WinGet
18 |
19 | If you have used WinRice, chances are you have WinGet installed.
20 |
21 | Run `winget.exe` in Windows Terminal to check if it's present.
22 |
23 | You can install WinGet by the following methods:
24 |
25 | - Get the latest release from [WinGet's GitHub repository](https://github.com/microsoft/winget-cli/releases/latest).
26 | - Use WinRice's own winget install script [paste in Windows Terminal (Admin)]: `Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://git.io/JWMKj'))`
27 | - Join [WinGet Insider Program](http://aka.ms/winget-InsiderProgram).
28 | - Join [Windows Insider Program](https://insider.windows.com/).
29 |
30 | Once installed through any of the above methods, verify it by running `winget.exe` in Windows Terminal.
31 |
32 | # Basic Usage
33 |
34 | ## Searching Apps
35 |
36 | **Command:** `winget search`
37 | | Command with options | Use |
38 | |-------|--------|
39 | | `winget search app` | Searches for app |
40 | | `winget search "an app"` | Searches for "an app" |
41 | | `winget search publisher.app` | Searches for publisher.app |
42 |
43 | ## Installing Apps
44 |
45 | **Command:** `winget install`
46 | | Command with options | Use |
47 | |-------|--------|
48 | | `winget install app` | Installs the given app |
49 | | `winget install "an app"` | Installs "an app" |
50 | | `winget install publisher.app` | Installs publisher.app |
51 |
52 | ## Upgrading Apps
53 |
54 | **Command:** `winget upgrade`
55 | | Command with options | Use |
56 | |-------|--------|
57 | | `winget upgrade` | Checks for app updates |
58 | | `winget upgrade -all` | Updates all apps |
59 |
60 | ## Uninstalling Apps
61 |
62 | **Command:** `winget uninstall`
63 | | Command with options | Use |
64 | |-------|--------|
65 | | `winget uninstall app` | Uninstalls the given app |
66 | | `winget uninstall "an app"` | Uninstalls "an app" |
67 | | `winget uninstall publisher.app` | Uninstalls publisher.app |
68 |
69 | # Advanced Usage
70 |
71 | ## More Commands
72 |
73 | Use `winget` in Windows Terminal to list all commands and their usage.
74 |
75 | ## Related Links
76 |
77 | [Source Repo](https://github.com/microsoft/winget-cli/)
78 | [Packages Repo](https://github.com/microsoft/winget-pkgs/)
79 | [Documentation](https://docs.microsoft.com/en-us/windows/package-manager/winget/)
80 |
81 | ---
82 |
83 | ## Feedback
84 |
85 | 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+).
86 |
--------------------------------------------------------------------------------
/doc/winget/winstall.md:
--------------------------------------------------------------------------------
1 | # Winstall
2 |
3 | Winstall is a powerful feature that enables you to effortlessly batch install applications. It simplifies the process of setting up your system by automating the installation of multiple apps in one go.
4 |
5 | **Dependency**: [`winget`](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winget.md) must installed on your system.
6 |
7 | ## Creating your Winstall
8 |
9 | During the setup process, WinRice scans the current directory for the presence of the `Winstall.txt` file. If the file is found, WinRice will not nudge you. However, if the file is not found, WinRice will create one for you and open it in Notepad for you to populate.
10 |
11 | Adhere to the following format when populating the `Winstall.txt` file:
12 |
13 | ```
14 | app 1
15 | app 2
16 | ```
17 |
18 | ## Examples
19 |
20 | Here's an example of the syntax used in the `Winstall.txt` file to install popular applications:
21 |
22 | ```
23 | Firefox
24 | Visual Studio Code
25 | Windows Terminal
26 | Obsidian
27 | ```
28 |
29 | By simply specifying the names of the desired applications in the `Winstall.txt` file, you can effortlessly install them using Winstall.
30 |
31 | ⚠️ **Note:** Kindly ensure that each app name is accurately listed on a separate line. Failure to comply will result in unexpected behavior.
32 |
33 | ## Related Documentation
34 |
35 | Explore the following documentation to further enhance your understanding of Winstall:
36 |
37 | - [WinGet Docs](https://docs.microsoft.com/en-us/windows/package-manager/winget/)
38 | - [WinGet Install](https://docs.microsoft.com/en-us/windows/package-manager/winget/install)
39 |
40 | ---
41 |
42 | ## Feedback
43 |
44 | Your feedback is highly valued! If you encounter any issues with the documentation or come across accessibility concerns, please don't hesitate to [file an issue](https://github.com/pratyakshm/WinRice/issues/new?assignees=pratyakshm&labels=Issue-Docs&template=doc_issue.yaml&title=Docs+issue%3A+). We appreciate your contribution in making our documentation better.
45 |
--------------------------------------------------------------------------------
/scripts/DisableVBS.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | Write-Host "Disabling Virtualization-based security..."
6 | 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
7 | New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Type DWord -Value 0 | Out-Null # Disables VBS
8 | New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Type DWord -Value 0 | Out-Null # Core isolation switch
9 | Write-Host "Disabled Virtualization-based security."
--------------------------------------------------------------------------------
/scripts/EnableVBS.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | Write-Host "Enabling Virtualization-based security..."
6 | Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "HyperVVirtualizationBasedSecurityOptOut"
7 | Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity"
8 | Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" -Name "Enabled" -Type DWord -Value 1
9 | Write-Host "Enabled Virtualization-based security."
--------------------------------------------------------------------------------
/scripts/EnableWSL.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | if ($CurrentBuild -lt 22000) {
6 | Write-Host "Enabling Windows Subsystem for Linux..."
7 | Enable-WindowsOptionalFeature -FeatureName "Microsoft-Windows-Subsystem-Linux" -Online -All -NoRestart -WarningAction Ignore | Out-Null
8 | Enable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -Online -All -NoRestart -WarningAction Ignore | Out-Null
9 | if (Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -like "Enterprise*" -or $_.Edition -eq "Education" -or $_.Edition -eq "Professional"}) {
10 | Enable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V" -Online -All -NoRestart -WarningAction Ignore | Out-Null
11 | }
12 | else {
13 | $ProductName = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName
14 | Write-Host "Could not enable Hyper-V since $ProductName does not support it."
15 | }
16 | Write-Host "Enabled Windows Subsystem for Linux."
17 | }
18 | elseif ($CurrentBuild -ge 22000) {
19 | Write-Host "Enabling Windows Subsystem for Linux version 2 along with GUI App support..."
20 | wsl --install | Out-Null
21 | Write-Host "Enabled Windows Subsystem for Linux."
22 | }
--------------------------------------------------------------------------------
/scripts/README.md:
--------------------------------------------------------------------------------
1 | #Scripts
2 |
3 | Scripts for popular functions so that you can run them without having to go through the entire WinRice experience.
4 |
5 | To run any script, copy and paste the command into Windows Terminal (Admin).
6 |
7 | ## Winstall
8 |
9 | Installs apps you pre-list in a text file. [Learn more](https://github.com/pratyakshm/WinRice/blob/main/doc/winget/winstall.md).
10 |
11 |
12 | ```powershell
13 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/Winstall.ps1'))
14 | ```
15 |
16 |
17 | ## Winget Import
18 |
19 | 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).
20 |
21 | ```powershell
22 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/WingetImport.ps1'))
23 | ```
24 |
25 |
26 | ## Flow Launcher
27 |
28 | Installs [Flow Launcher](https://flowlauncher.com), configures core plugins and installs onsetGlaze acrylic theme.
29 |
30 | ```powershell
31 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/SetupFlowLauncher.ps1'))
32 | ```
33 |
34 |
35 | ## Windows Subsystem for Linux
36 |
37 | ### Enable
38 |
39 | ```powershell
40 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/EnableWSL.ps1'))
41 | ```
42 |
43 |
44 | ## Virtualization-based security
45 |
46 | ### Enable
47 |
48 | ```powershell
49 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/EnableVBS.ps1'))
50 | ```
51 |
52 | ### Disable
53 |
54 | ```powershell
55 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/DisableVBS.ps1'))
56 | ```
57 |
58 |
59 | ## Windows Update
60 |
61 | ### Setup Policies ([see policies](https://github.com/pratyakshm/WinRice/blob/main/doc/Main-brief.md#%EF%B8%8F-windows-update))
62 |
63 | ```powershell
64 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/SetupWU.ps1'))
65 |
66 | ```
67 |
68 | ### Restore Default Policies
69 |
70 | ```powershell
71 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pratyakshm/WinRice/main/scripts/ResetWU.ps1'))
72 | ```
73 |
74 |
75 | ---
76 |
77 |
78 | ## Feedback
79 |
80 | 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+).
81 |
--------------------------------------------------------------------------------
/scripts/ResetWU.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse
6 | Write-Host "Windows Update settings have been reset."
--------------------------------------------------------------------------------
/scripts/SetupFlowLauncher.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | Write-Host "Installing Flow Launcher..."
6 | winget install Flow-Launcher.Flow-Launcher | Out-Null
7 |
8 | # Check if Flow Launcher is successfully installed.
9 | $packageId = "Flow-Launcher.Flow-Launcher"
10 | $installedPackages = winget list
11 | if ($installedPackages -match $packageId) {
12 | Write-Host "Flow Launcher is installed."
13 | } else {
14 | Write-Host "Failed to install Flow Launcher."
15 | return
16 | }
17 |
18 | Write-Host "Customizing Flow Launcher..."
19 |
20 | # Stop Flow Launcher running processes and remove Settings backup to ensure no unintended overwrite
21 | Stop-Process -Name "flow.launcher" -Force
22 |
23 | # Declare settings files locations
24 | $settingsFolderPath = "$env:APPDATA\FlowLauncher\Settings"
25 | $settingsPath = Join-Path -Path $settingsFolderPath -ChildPath "Settings.json"
26 | $backupPath = Join-Path -Path $settingsFolderPath -ChildPath "Settings.json.bak"
27 |
28 | # Delete the backup file to avoid unintended overwrite
29 | Remove-Item -Path $backupPath -Force -ErrorAction SilentlyContinue
30 |
31 | # Download the onsetGlaze theme for Flow
32 | $url = "https://raw.githubusercontent.com/abhidahal/onsetGlaze.flow/main/OnsetGlaze.xaml"
33 | $outputPath = "$env:APPDATA\FlowLauncher\Themes\OnsetGlaze.xaml"
34 | Invoke-WebRequest -Uri $url -OutFile $outputPath
35 |
36 | # Update to OnsetGlaze Theme
37 | $newThemeValue = "OnsetGlaze"
38 | $jsonContent = Get-Content -Path $settingsPath | ConvertFrom-Json
39 | $jsonContent.Theme = $newThemeValue
40 | $jsonContent | ConvertTo-Json -Depth 100 | Set-Content -Path $settingsPath
41 |
42 | # Disable unnecessary plugins
43 | $pluginsToDisable = @(
44 | "CEA0FDFC6D3B4085823D60DC76F28855",
45 | "572be03c74c642baae319fc283e561a8",
46 | "6A122269676E40EB86EB543B945932B9",
47 | "9f8f9b14-2518-4907-b211-35ab6290dee7",
48 | "D409510CD0D2481F853690A07E6DC426",
49 | "0308FD86DE0A4DEE8D62B9B535370992",
50 | "565B73353DBF4806919830B9202EE3BF",
51 | "5043CETYU6A748679OPA02D27D99677A"
52 | )
53 | function DisablePlugins {
54 | param(
55 | [Parameter(Mandatory=$true)]
56 | [System.Management.Automation.PSObject]$Object
57 | )
58 |
59 | $Object.PSObject.Properties | ForEach-Object {
60 | if ($_.Value -is [System.Management.Automation.PSObject]) {
61 | DisablePlugins -Object $_.Value
62 | }
63 | elseif ($_.Name -eq "ID" -and $pluginsToDisable -contains $_.Value) {
64 | $Object.Disabled = $true
65 | }
66 | }
67 | }
68 |
69 | $jsonContent = Get-Content -Path $settingsPath | ConvertFrom-Json
70 | DisablePlugins -Object $jsonContent.PluginSettings.Plugins
71 | $jsonContent | ConvertTo-Json -Depth 100 | Set-Content -Path $settingsPath
72 | Write-Host "Customization performed: "
73 | Write-Host " – Set Theme to OnsetGlaze."
74 | Write-Host " – Disabled the following plugins:"
75 | Write-Host " – Browser Bookmarks"
76 | Write-Host " – Calculator"
77 | Write-Host " – Explorer"
78 | Write-Host " – Plugin Indicator"
79 | Write-Host " – Plugins Manager"
80 | Write-Host " – Shell"
81 | Write-Host " – URL"
82 | Write-Host " – Web Searches"
83 | Write-Host " – Windows Settings"
84 | Write-Host "You may change these preferences later in Flow Launcher Settings."
--------------------------------------------------------------------------------
/scripts/SetupWU.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | $CurrentVersionPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
6 | $CurrentBuild = Get-ItemPropertyValue $CurrentVersionPath -Name CurrentBuild
7 | $ProductName = Get-ItemPropertyValue $CurrentVersionPath -Name ProductName
8 |
9 | if ($CurrentBuild -ge 22000) {
10 | print "WinRice currently cannot set up Windows Update policies on Windows 11."
11 | exit
12 | }
13 |
14 | # Get Windows Edition, if its Professional, Education, or Enterprise.
15 | if (!(Get-WindowsEdition -Online | Where-Object -FilterScript {$_.Edition -like "Enterprise*" -or $_.Edition -eq "Education" -or $_.Edition -eq "Professional"})) {
16 | print "$ProductName does not support setting up Windows Update policies."
17 | return
18 | }
19 | print "Setting up Windows Update policies..."
20 |
21 | # Declare registry keys locations.
22 | $Update1 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"
23 | $Update2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
24 | if (!(Test-Path $Update1)) {
25 | New-Item -Path $Update1 | Out-Null
26 | New-Item -Path $Update2 | Out-Null
27 | }
28 |
29 | # Write registry values.
30 | Set-ItemProperty -Path $Update1 -Name DeferQualityUpdates -Type DWord -Value 1
31 | Set-ItemProperty -Path $Update1 -Name DeferQualityUpdatesPeriodInDays -Type DWord -Value 4
32 | Set-ItemProperty -Path $Update1 -Name DeferFeatureUpdates -Type DWord -Value 1
33 | Set-ItemProperty -Path $Update1 -Name DeferFeatureUpdatesPeriodInDays -Type DWord -Value 20
34 | Set-ItemProperty -Path $Update2 -Name NoAutoUpdate -Type DWord -Value 1
35 | Set-ItemProperty -Path $Update2 -Name NoAutoRebootWithLoggedOnUsers -Type Dword -Value 1
36 |
37 | # print user message; policies applied.
38 | $WinUpdatePolicies =@(
39 | "Turned off automatic updates"
40 | "Device will no longer auto restart if users are signed in"
41 | "Turned off re-installation of apps after Windows Updates"
42 | "Delayed quality updates by 4 days"
43 | "Delayed feature updates by 20 days"
44 | )
45 | ForEach ($WinUpdatePolicy in $WinUpdatePolicies) {
46 | print " - $WinUpdatePolicy"
47 | }
48 |
49 | print "Set up Windows Update policies."
--------------------------------------------------------------------------------
/scripts/WingetImport.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | if (!(Get-Command winget)) {
6 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://git.io/JurY1'))
7 | }
8 |
9 | [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
10 | Write-Host "Select the exported JSON from File Picker UI"
11 | $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
12 | $OpenFileDialog.InitialDirectory = $initialDirectory
13 | $OpenFileDialog.Filter = "JSON (*.json)| *.json"
14 | $OpenFileDialog.ShowDialog() | Out-Null
15 | if ($OpenFileDialog.FileName) {
16 | Write-Host "Initializing JSON file..."
17 | Start-Sleep -Milliseconds 200
18 | winget import $OpenFileDialog.FileName
19 | }
20 | elseif (!($OpenFileDialog.FileName)) {
21 | Write-Host "No JSON selected."
22 | }
--------------------------------------------------------------------------------
/scripts/Winstall.ps1:
--------------------------------------------------------------------------------
1 | # This file is a part of the WinRice software
2 | # Copyright (c) 2020-2024 Pratyaksh Mehrotra
3 | # All rights reserved.
4 |
5 | Function print($text) {
6 | Write-Host $text
7 | }
8 |
9 |
10 | if (!(Get-Command winget)) {
11 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://git.io/JurY1'))
12 | }
13 |
14 | # Try Winstall.txt
15 | if (Test-Path Winstall.txt) {
16 | print "Starting Winstall..."
17 | # Get each line from the text file and use winget install command on it.
18 | Get-Content 'Winstall.txt' | ForEach-Object {
19 | $App = $_.Split('=')
20 | print " Installing $App..."
21 | winget install "$App" --silent | Out-Null
22 | }
23 | print "Winstall has successfully installed the app(s)."
24 | }
25 |
26 | # Try winstall.txt
27 | elseif (Test-Path winstall.txt) {
28 | print "Starting Winstall..."
29 | # Get each line from the text file and use winget install command on it.
30 | Get-Content 'winstall.txt' | ForEach-Object {
31 | $App = $_.Split('=')
32 | print " Installing $App..."
33 | winget install "$App" --silent | Out-Null
34 | }
35 | print "Winstall has successfully installed the app(s)."
36 | }
37 | else {
38 | [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
39 | print "Select Winstall text file from File Picker UI"
40 | $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
41 | $OpenFileDialog.InitialDirectory = $initialDirectory
42 | $OpenFileDialog.Filter = "Text file (*.txt)| *.txt"
43 | $OpenFileDialog.ShowDialog() | Out-Null
44 | if ($OpenFileDialog.FileName) {
45 | print "Starting Winstall..."
46 | Get-Content $OpenFileDialog.FileName | ForEach-Object {
47 | $App = $_.Split('=')
48 | print " Installing $App..."
49 | winget install "$App" --silent | Out-Null
50 | }
51 | print "Winstall has successfully installed the app(s)."
52 | }
53 | else {
54 | print "No text file was picked."
55 | }
56 | }
--------------------------------------------------------------------------------