Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Configuration files and documentation are already in place.

## 🪟 Windows Version Support

**Supported:** Windows 11 (22H2 or later) ONLY
**Supported:** Windows 11 (24H2 or later) ONLY

**Not Supported:** Windows 10

Expand Down Expand Up @@ -79,16 +79,16 @@ declarative-windows/

### Workflow 1: Custom ISO Generation (Recommended)

**Goal:** Create a custom Windows ISO with all configs baked in - one command, fully automated
**Goal:** Create a custom Windows ISO with all configs baked in - one command, automated after manual disk selection

```bash
# 1. Generate custom ISO (one command)
.\build-iso.ps1 -SourceISO "Win11_English_x64.iso" -OutputISO "Win11_Custom.iso"

# 2. Burn ISO to USB or boot in VM

# 3. Boot from ISO - Windows installs automatically with:
# - autounattend.xml configures Windows setup
# 3. Boot from ISO - choose the target disk/partition, then setup continues with:
# - autounattend.xml configures Windows setup after disk selection
# - Files copied to C:\Setup via $OEM$ folder
# - bootstrap.ps1 runs automatically after first login
# - Desktop shortcut created for manual re-runs
Expand Down
4 changes: 3 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Before reinstall, you can also run a declarative backup workflow that preserves

## What Windows versions are supported?

Windows 11 only (22H2 or later). Windows 10 is not supported.
Windows 11 only (24H2 or later). Windows 10 is not supported.

## Do I need to create a custom ISO?

Expand All @@ -37,6 +37,8 @@ winget export -o apps.json

Then edit the JSON to remove unwanted apps.

If you want some apps to stay optional after reinstall, create `optional-apps.json` with the same WinGet manifest format. Bootstrap prompts for it after first login and also creates `Install Optional Apps.lnk` for later use.

## Where does the repo live after reinstall?

The installer tries to clone the original repo remote into `%USERPROFILE%\Documents\declarative-windows`.
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ winget export -o apps.json --source winget

For personal usage, keep `apps.json` out of git. The repo ships `apps-template.json`, and the backup workflow preserves your personal `apps.json` so it can be restored into the cloned repo after reinstall.

If you want a second-stage app list, create `optional-apps.json` alongside `apps.json`. `apps.json` installs automatically during bootstrap, while `optional-apps.json` is offered with a yes/no prompt after first login and can also be installed later from a desktop shortcut.

### Backup Before Reinstall

Create a personal backup config by copying `config\backup.template.json` to `config\backup.json`, then enable the known folders and extra paths you want to preserve.
Expand Down Expand Up @@ -121,6 +123,13 @@ winget import apps.json --ignore-versions
winget import apps.json --accept-package-agreements --accept-source-agreements
```

Optional apps can use the same manifest format:

```powershell
Copy-Item apps.json optional-apps.json
# Then edit optional-apps.json for apps you want to install later
```

### 4. Find Package IDs

```powershell
Expand All @@ -137,7 +146,7 @@ If you want to test OS tweaks before automation:

```powershell
# 1. Download Sophia Script for Windows 11
Invoke-WebRequest -Uri "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest/download/Sophia.Script.for.Windows.11.v6.9.1.zip" -OutFile "SophiaScript.zip"
Invoke-WebRequest -Uri "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest/download/Sophia.Script.for.Windows.11.v7.1.4.zip" -OutFile "SophiaScript.zip"

# 2. Extract the archive
Expand-Archive -Path "SophiaScript.zip" -DestinationPath ".\SophiaScript" -Force
Expand Down Expand Up @@ -167,7 +176,8 @@ declarative-windows/
├── CLAUDE.md # Project guidance for Claude Code
├── brainstorm.md # Design discussions
├── apps.json # Your WinGet package list (create this)
├── apps.json # Auto-installed WinGet package list
├── optional-apps.json # Prompted/later WinGet package list (optional)
├── Sophia-Preset.ps1 # Custom Sophia Script configuration
├── autounattend.xml # Windows unattended install config
├── bootstrap.ps1 # Main orchestration script
Expand All @@ -184,7 +194,7 @@ declarative-windows/

## Windows Version Support

**Supported:** Windows 11 (22H2 or later)
**Supported:** Windows 11 (24H2 or later)

**Not Supported:** Windows 10

Expand Down
6 changes: 4 additions & 2 deletions SOPHIA-FUNCTIONS-REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Sophia Script for Windows 11 - Complete Function Reference
**Version:** 6.9.1
# Sophia Script for Windows 11 - Archived Function Reference
**Version:** 6.9.1 (archived snapshot)
**Source:** https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/src/Sophia_Script_for_Windows_11/Sophia.ps1

> This file is an older local reference. The active preset targets Sophia Script `7.1.4` and Windows 11 `24H2+`, so verify behavior against the upstream 7.1.4 release before relying on this document.

---

## Privacy & Telemetry
Expand Down
58 changes: 28 additions & 30 deletions Sophia-Preset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

.DESCRIPTION
This preset file contains customized Windows 11 tweaks and configurations.
Verified against Sophia Script v6.9.1 for Windows 11.
Verified against Sophia Script v7.1.4 for Windows 11.

This preset handles ALL UI tweaks, registry customizations, and OS settings.
AutoUnattend.xml only handles installation-time tasks (disk setup, bloatware removal).
AutoUnattend.xml only handles installation-time tasks (manual disk selection flow, bloatware removal).

.NOTES
Tested with: Sophia Script v6.9.1
Windows 11: 22H2 or later
Tested with: Sophia Script v7.1.4
Windows 11: 24H2 or later
Reference: SOPHIA-FUNCTIONS-REFERENCE.md

.LINK
Expand Down Expand Up @@ -93,8 +93,8 @@ AppColorMode -Dark
# Open File Explorer to "This PC"
OpenFileExplorerTo -ThisPC

# Disable search highlights
SearchHighlights -Disable
# Hide search highlights
SearchHighlights -Hide

# Hide widgets icon on taskbar
TaskbarWidgets -Hide
Expand Down Expand Up @@ -142,14 +142,14 @@ WindowsTips -Disable
# Enable storage sense (auto cleanup)
StorageSense -Enable

# Disable hibernation (saves disk space)
Hibernation -Disable
# Keep hibernation at the Windows default unless you explicitly want it off
# Hibernation -Disable

# Set power plan to high performance
PowerPlan -High
# Keep the default balanced power plan for main-machine use
# PowerPlan -High

# Enable long path support (>260 characters)
Win32LongPathSupport -Enable
Win32LongPathsSupport -Enable

# Don't let Windows manage default printer
WindowsManageDefaultPrinter -Disable
Expand All @@ -175,13 +175,13 @@ StickyShift -Disable
# Disable autoplay for all media
Autoplay -Disable

# Don't save zone information about files from Internet
SaveZoneInformation -Disable
# Keep zone information on downloaded files for SmartScreen/Attachment Manager
# SaveZoneInformation -Disable
#endregion System

#region Windows Features
# Install Windows Subsystem for Linux
Install-WSL
# Install Windows Subsystem for Linux when explicitly needed
# Install-WSL

# Note: .NET 3.5 can be installed via WindowsCapabilities if needed
# WindowsCapabilities -Install -Names "NetFx3~~~~"
Expand Down Expand Up @@ -212,14 +212,14 @@ XboxGameTips -Disable
#endregion Gaming

#region Scheduled Tasks
# Disable Windows cleanup scheduled task
CleanupTask -Disable
# Delete Sophia Windows cleanup scheduled task if it exists
CleanupTask -Delete

# Disable SoftwareDistributionTask
SoftwareDistributionTask -Disable
# Delete Sophia SoftwareDistribution cleanup task if it exists
SoftwareDistributionTask -Delete

# Disable temp files cleanup task
TempTask -Disable
# Delete Sophia temp cleanup task if it exists
TempTask -Delete
#endregion Scheduled Tasks

#region Microsoft Defender & Security
Expand All @@ -232,13 +232,11 @@ PUAppsDetection -Enable
# Enable Microsoft Defender Sandbox
DefenderSandbox -Enable

# Disable SmartScreen for apps and files
AppsSmartScreen -Disable
# Keep SmartScreen enabled for apps and downloaded files
# AppsSmartScreen -Disable

# Enable DNS-over-HTTPS (Cloudflare)
DNSoverHTTPS -Enable -PrimaryDNS 1.1.1.1 -SecondaryDNS 1.0.0.1

# Note: Change to Google DNS if preferred: -PrimaryDNS 8.8.8.8 -SecondaryDNS 8.8.4.4
# Optional: enable DNS-over-HTTPS with a named provider if you want to force it
# DNSoverHTTPS -Cloudflare
#endregion Microsoft Defender & Security

#region Context Menu
Expand All @@ -258,7 +256,7 @@ OpenWindowsTerminalContext -Show
#endregion Context Menu

<#
VERIFIED AGAINST: Sophia Script v6.9.1
VERIFIED AGAINST: Sophia Script v7.1.4
REFERENCE: SOPHIA-FUNCTIONS-REFERENCE.md

DIVISION OF RESPONSIBILITIES:
Expand All @@ -268,8 +266,8 @@ OpenWindowsTerminalContext -Show
WHAT THIS PRESET INCLUDES:
1. Privacy: Disabled telemetry, Bing, tips, suggested content, tailored experiences
2. UI: Dark mode, show file extensions/hidden files, left taskbar, minimal icons
3. System: High performance, storage sense, disabled hibernation, long paths
4. Security: Network protection, PUA detection, Defender sandbox, DNS-over-HTTPS
3. System: storage sense, long paths, conservative main-machine defaults
4. Security: Network protection, PUA detection, Defender sandbox
5. Debloat: Disabled Xbox features, autoplay, unnecessary scheduled tasks

TO CUSTOMIZE:
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
- [ ] 🟡 ✅ Test Sophia Script execution on fresh Windows
- [ ] 🟡 ✅ Verify desktop summary log is created correctly
- [ ] 🟡 ✅ Test "continue where left off" after simulated failure
- [ ] 🟢 ✅ Verify all scripts work with Windows 11 (22H2 or later)
- [ ] 🟢 ✅ Verify all scripts work with Windows 11 (24H2 or later)

---

Expand Down
Loading
Loading