Skip to content

Version History

Calvindd2f edited this page Jan 14, 2026 · 1 revision

Version History

Relevant source files

The following files were used as context for generating this wiki page:

This page documents the complete version history of OfficeScrubC2R, including release dates, new features, bug fixes, breaking changes, and performance improvements. Each version follows Semantic Versioning principles (MAJOR.MINOR.PATCH).

For information about the release process and how versions are published, see Release Process. For current module metadata and version information, refer to Module Manifest.

Sources: CHANGELOG.md:1-148, CONTRIBUTING.md:184-200


Version Timeline

The following diagram illustrates the progression of major releases and their architectural focus:

timeline
    title OfficeScrubC2R Version Evolution
    section Development
        v0.1.0 : Initial development : Basic module structure : Core functionality
    section Major Releases
        v2.2.0 : Performance optimization : Memory efficiency : Collection performance : String operations
        v2.19.0 : Initial public release : PowerShell Gallery : Native DLL : VBScript parity
    section Bug Fixes
        v2.19.1 : Initialization fixes : DO NOT USE : Module loading order
        v2.19.2 : Critical fix : Missing script file : Complete package
    section Architecture Redesign
        v3.0.0 : Streamlined wrapper : Direct DLL exposure : Helper functions : Breaking changes
Loading

Sources: CHANGELOG.md:1-148, OfficeScrubC2R.psd1:6


Current Version

The current production version is defined in the module manifest:

Property Value Location
ModuleVersion 3.0.0 OfficeScrubC2R.psd1:6
GUID f8e7c4d1-5a3b-4e2d-9c8f-1b6a4d7e9c3a OfficeScrubC2R.psd1:12
Release Date Current OfficeScrubC2R.psd1:124-137
PowerShell Version 5.1+ OfficeScrubC2R.psd1:29
DotNet Framework 4.5+ OfficeScrubC2R.psd1:32

Sources: OfficeScrubC2R.psd1:1-157


Version 3.0.0 - Architecture Redesign

Status: Current Release
Release Notes Location: OfficeScrubC2R.psd1:124-137

Overview

Version 3.0.0 represents a fundamental architectural redesign, transitioning from a script-heavy implementation to a lightweight PowerShell wrapper around the native C# DLL.

What's New

Feature Description Files Affected
Streamlined Module PowerShell module now focuses exclusively on loading native binary OfficeScrubC2R.psm1
Helper Functions New helper functions for orchestrator creation and scope checking OfficeScrubC2R.psd1:58-64
Repository Cleanup Original VBScript and C# reference sources maintained for contrast OfficeScrubC2R.psd1:82-91
Direct DLL Access Expose native methods and Windows API code directly OfficeScrubC2R.psd1:25-26

Exported Functions

The module exports five core functions defined in the manifest:

FunctionsToExport:
  - Import-OfficeScrubNative
  - New-OfficeScrubOrchestrator
  - Test-OfficeC2RPath
  - Test-OfficeProductScope
  - Get-OfficeScrubHelpers

Sources: OfficeScrubC2R.psd1:58-64

Breaking Changes

Change Impact Migration Path
Removed Legacy Functions Script-based functions removed Use native wrapper functions
Changed API Surface Reduced function count from ~20 to 5 Update scripts to use orchestrator pattern
Module Structure Simplified to single-layer wrapper Import new module version

File List Changes

The FileList property in the manifest defines the package contents:

File Purpose
OfficeScrubC2R.psd1 Module manifest
OfficeScrubC2R.psm1 PowerShell wrapper module
OfficeScrubNative.dll Compiled native library
OfficeScrubC2R-Native.cs C# source code
direct_conversion.cs Reference conversion
docs\source\OfficeScrubC2R.vbs Original Microsoft VBScript
LICENSE MIT License
README.md Documentation

Sources: OfficeScrubC2R.psd1:82-91, OfficeScrubC2R.psd1:124-137


Version 2.19.2 - Critical Bug Fix

Release Date: 2025-10-05
Status: Superseded by v3.0.0
Changelog Location: CHANGELOG.md:8-17

Fixed

This release addresses a critical packaging issue from v2.19.1:

Issue Description Impact
Missing Script File OfficeScrubC2R.ps1 not included in PowerShell Gallery package Module failed to load
Initialization Logic Fixed initialization logic missing from package Runtime errors
FileList Update Updated manifest FileList to include all required scripts Complete package

Critical Advisory

Important: Version 2.19.1 was incomplete due to missing main script file. All users should update to 2.19.2 or later.

Sources: CHANGELOG.md:8-17


Version 2.19.1 - Initialization Fixes (DO NOT USE)

Release Date: 2025-10-05
Status: Incomplete - Superseded by v2.19.2
Changelog Location: CHANGELOG.md:19-33

Warning

This version contains incomplete packaging and should not be used. Update to v2.19.2 or later immediately.

Attempted Fixes

Issue Solution Attempted Result
Module initialization order Initialize-Environment runs automatically on import Incomplete - missing script file
Empty path parameter Reordered function calls Incomplete - missing script file
Null reference errors Added null checks to Test-IsC2R and Test-ProductInScope Incomplete - missing script file

Changes

  • Module loading sequence modified to ensure utilities module loads before initialization
  • Initialize-Environment called after module exports instead of during load
  • Initialize-Script now calls Initialize-Environment before Initialize-Log
  • Improved error handling with warning messages when orchestrator not initialized

Sources: CHANGELOG.md:19-33


Version 2.19.0 - Initial Public Release

Release Date: 2025-10-05 (Initial), 2025-01-XX (Planned)
Status: Superseded by v3.0.0
Changelog Location: CHANGELOG.md:34-43, CHANGELOG.md:106-140

Overview

Version 2.19.0 represents the initial PowerShell Gallery release, providing feature parity with Microsoft's OffScrubC2R.vbs v2.19.

Added

Feature Description Performance Gain
Complete PowerShell/C# Port Full conversion from VBScript 10-50x faster overall
Native C# Library OfficeScrubNative.dll for high-performance ops 30x faster registry
Pre-compiled DLL Included DLL with source fallback compilation Instant load time
Comprehensive Logging Structured logging and error handling N/A
Office Support 2013, 2016, 2019, Office 365 C2R N/A
Parallel Processing File and registry operations 15x faster files
PowerShell Gallery Compatible module structure N/A
Build Infrastructure Build script for DLL compilation N/A
Test Suite Comprehensive functional tests N/A
Help Documentation Full comment-based help N/A

Performance Comparison

The following table compares execution times between VBScript and PowerShell implementations:

Operation VBScript PowerShell v2.19.0 Speedup
Registry Enumeration ~30 seconds ~1 second 30x
File Deletion ~15 seconds ~1 second 15x
Process Termination ~5 seconds ~0.5 seconds 10x
Overall Execution 50-100 seconds 5-10 seconds 10-50x

Architecture

The architecture introduced in v2.19.0 establishes the foundational design:

graph TB
    subgraph "v2.19.0 Architecture"
        PS["PowerShell Module<br/>(OfficeScrubC2R.psm1)"]
        DLL["Native DLL<br/>(OfficeScrubNative.dll)"]
        ORCH["OfficeScrubOrchestrator<br/>(Coordinator)"]
        
        subgraph "Helper Classes"
            REG["RegistryHelper"]
            FILE["FileHelper"]
            PROC["ProcessHelper"]
            WI["WindowsInstallerHelper"]
            TL["TypeLibHelper"]
            LIC["LicenseHelper"]
            SVC["ServiceHelper"]
            SH["ShellHelper"]
        end
    end
    
    PS --> DLL
    DLL --> ORCH
    ORCH --> REG
    ORCH --> FILE
    ORCH --> PROC
    ORCH --> WI
    ORCH --> TL
    ORCH --> LIC
    ORCH --> SVC
    ORCH --> SH
Loading

Sources: CHANGELOG.md:34-43, CHANGELOG.md:106-140


Version 2.2.0 - Performance Optimization

Release Date: 2025-05-10
Status: Internal Release
Changelog Location: CHANGELOG.md:44-103

Overview

Version 2.2.0 introduced major performance optimizations focused on memory efficiency and algorithmic improvements.

Key Optimizations

1. Memory Efficiency

Optimization Technique Improvement
Temporary Strings Span<char> and stackalloc 30-50% reduction in allocations
GUID Operations Eliminated StringBuilder allocations 3-5x faster
String Operations Reduced concatenations and substrings 2x faster

2. Collection Performance

Optimization Change Improvement
Lookups Arrays → HashSet<string> O(n) → O(1)
Comparisons StringComparer.OrdinalIgnoreCase 2x faster
Validation Pre-computed static collections Instant lookup

3. Registry Operations

Optimization Implementation Benefit
Hive Key Caching Cached GetHiveKey() calls 2-3x faster enumeration
Combined Operations Helper methods for duplicates Reduced API calls
Pattern Matching Switch expressions Cleaner code

4. Process Management

Optimization Implementation Benefit
Resource Cleanup Proper Process disposal No resource leaks
Name Extraction Optimized process name extraction Faster enumeration
Guard Clauses Empty task collection checks Early exit

5. String Operations

Optimization Technique Improvement
Comparisons StringComparison.OrdinalIgnoreCase 2x faster vs ToLower()
Substrings ReadOnlySpan<char> Zero allocations
Interpolation Used where appropriate Better readability

6. Code Structure

Improvement Description
Import Cleanup Removed unused imports and classes
Logic Simplification Simplified complex conditionals
Expression Bodies Used for simple members
Code Deduplication Eliminated redundant paths

Performance Summary Table

Operation Before v2.2.0 After v2.2.0 Speedup
GUID Operations Baseline 3-5x 400%
Registry Enumeration Baseline 2-3x 200%
String Comparisons Baseline 2x 100%
Memory Usage Baseline 50-70% 30-50% reduction

Performance Optimization Flow

The following diagram shows the optimization strategy applied in v2.2.0:

graph LR
    subgraph "Before v2.2.0"
        ARR["Arrays<br/>O(n) lookups"]
        STR["String allocations<br/>StringBuilder"]
        COMP["ToLower() comparisons"]
        NORES["No resource disposal"]
    end
    
    subgraph "After v2.2.0"
        HASH["HashSet<br/>O(1) lookups"]
        SPAN["Span<char><br/>stackalloc"]
        ORD["StringComparison.OrdinalIgnoreCase"]
        DISP["using statements<br/>IDisposable"]
    end
    
    ARR --> HASH
    STR --> SPAN
    COMP --> ORD
    NORES --> DISP
Loading

Sources: CHANGELOG.md:44-103


Version 0.1.0 - Initial Development

Release Date: 2025-01-XX
Status: Development Version
Changelog Location: CHANGELOG.md:133-140

Overview

Initial development version establishing the basic module structure and core functionality.

Added

Component Description
Module Structure Basic PowerShell module layout
Core Functionality Initial implementation of cleanup operations
Build System Preliminary build scripts

This version was never released publicly and served as the foundation for v2.19.0.

Sources: CHANGELOG.md:133-140


Version Compatibility Matrix

The following table documents compatibility across different versions:

Version PowerShell .NET Framework .NET Core Windows Office Versions Status
v3.0.0 5.1+ 4.5+ 7+ 7 SP1 - 11 2013-365 Current
v2.19.2 5.1+ 4.5+ 7+ 7 SP1 - 11 2013-365 Superseded
v2.19.1 5.1+ 4.5+ 7+ 7 SP1 - 11 2013-365 Do Not Use
v2.19.0 5.1+ 4.5+ 7+ 7 SP1 - 11 2013-365 Superseded
v2.2.0 5.1+ 4.5+ N/A 7 SP1 - 11 2013-365 Internal
v0.1.0 5.1+ 4.5+ N/A 7 SP1 - 11 2013-365 Development

Sources: CHANGELOG.md:143-148, OfficeScrubC2R.psd1:29-35


Breaking Changes Summary

v3.0.0 Breaking Changes

Component Before After Migration
Function Count ~20 script functions 5 wrapper functions Use orchestrator pattern
API Surface Direct script functions Native DLL methods Call through orchestrator
Module Structure Multi-layer scripts Single wrapper layer Update Import-Module
Function Names Various naming patterns Standardized helpers Update function calls

Migration Path to v3.0.0

flowchart TD
    OLD["Legacy Script<br/>(v2.19.x functions)"]
    
    subgraph "v3.0.0 Migration"
        IMPORT["Import-OfficeScrubNative"]
        ORCH["New-OfficeScrubOrchestrator"]
        HELPERS["Get-OfficeScrubHelpers"]
    end
    
    OLD --> IMPORT
    IMPORT --> ORCH
    ORCH --> HELPERS
    
    HELPERS --> REG["RegistryHelper methods"]
    HELPERS --> FILE["FileHelper methods"]
    HELPERS --> PROC["ProcessHelper methods"]
Loading

Sources: OfficeScrubC2R.psd1:124-137


Semantic Versioning Scheme

OfficeScrubC2R follows Semantic Versioning 2.0.0:

Version Component Increment When Example
MAJOR (X.0.0) Incompatible API changes v2.19.x → v3.0.0
MINOR (0.X.0) Add functionality (backward compatible) v2.19.0 → v2.20.0
PATCH (0.0.X) Bug fixes (backward compatible) v2.19.1 → v2.19.2

Version Number Format

MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]

Examples:
  3.0.0           - Production release
  3.1.0-preview   - Preview release
  3.0.1+20250105  - Patch with build metadata

Sources: CONTRIBUTING.md:184-191


Release Process Overview

The release process defined in CONTRIBUTING.md:192-211 involves these steps:

sequenceDiagram
    participant Dev as Developer
    participant Manifest as OfficeScrubC2R.psd1
    participant Changelog as CHANGELOG.md
    participant Git as Git Repository
    participant GH as GitHub Releases
    participant PSG as PowerShell Gallery
    
    Dev->>Manifest: Update ModuleVersion
    Dev->>Changelog: Update with release notes
    Dev->>Git: Create tag (v2.19.0)
    Dev->>Git: Push tags
    Dev->>GH: Create GitHub release
    Dev->>PSG: Publish-Module
Loading

For detailed release procedures, see Release Process.

Sources: CONTRIBUTING.md:192-211


Version History Sources

All version information documented on this page is derived from the following authoritative sources:

Source Purpose Location
Module Manifest Current version metadata OfficeScrubC2R.psd1:1-157
Changelog Historical version records CHANGELOG.md:1-148
Contributing Guide Version numbering and release process CONTRIBUTING.md:184-211
Build Scripts Compilation and versioning build.ps1
CI/CD Workflows Automated version validation .github/workflows/ci.yml

Sources: OfficeScrubC2R.psd1:1-157, CHANGELOG.md:1-148, CONTRIBUTING.md:1-232

Clone this wiki locally