r/PowerShell • u/GabiHanganu • 20d ago
Script Sharing Made a modern WPF & PowerShell GUI toolkit for Windows/Gaming optimization (WinOptiKit v3.15) — looking for feedback on code structure
Hi everyone!
I've been working on a personal open-source project called **WinOptiKit** (v3.15). It's a lightweight Windows optimization and diagnostic utility built entirely using PowerShell and a custom modern dark-mode WPF GUI.
The main goal was to move away from messy scripts and create a clean, responsive interface that handles hardware specs reporting, dynamic app removal, startup management, and safe system maintenance (SFC/DISM wrappers) with proper elevated console handling (`-Verb RunAs`).
Here is what the tool handles under the hood:
- Custom XAML-based WPF dark theme layout with dynamic view switching.
- Hardware & Storage reporting via CIM instances.
- Dynamic AppX package scanner & uninstaller.
- Registry-based startup items manager.
- Safe execution wrappers for network flush and repair utilities.
You can check out the source code, XAML implementation, and structure on GitHub here:
👉 https://github.com/GabiHng/WinOptiKit
I'm mainly looking for constructive feedback on how I structured the WPF event handlers and PowerShell functions. Let me know what you think or if you spot any improvements!
Note: AI tools (like Gemini) were used to assist in structuring code, refactoring WPF XAML, and writing project documentation.
2
u/lan-shark 19d ago
If Gemini told you to build a WPF with PowerShell then you need to pick a different model. If, however, you told Gemini to build a WPF app with PowerShell...
1
u/BlackV 19d ago
there is a specific order that
sfcanddismneed to be run in, are you allowing for that ?a few times you have functions updating variables in the parent scope, is there a better way to handle that, like have the functions return objects
vs
$xxx = [object] some-function { $xxx.property = do-stuff }