- Add Solidworks license files and install guides - Add PowerShell privacy lockdown scripts for Solidworks telemetry - Add Siemens License Server v5.1 binary for NX - Update DALIDOU-SERVER.md with storage layout, backup system, and DNS fixes - Add MEGA-PLAN-BRAIN-SYSTEM.md for unified knowledge management - Add Claude Code local settings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
335 lines
11 KiB
PowerShell
335 lines
11 KiB
PowerShell
#Requires -RunAsAdministrator
|
|
<#
|
|
.SYNOPSIS
|
|
Disables SolidWorks in-app telemetry and update checks via registry.
|
|
|
|
.DESCRIPTION
|
|
Modifies Windows Registry to disable:
|
|
- Customer Experience Improvement Program (CEIP)
|
|
- Automatic update checks
|
|
- Anonymous usage data collection
|
|
- 3DEXPERIENCE connection prompts
|
|
|
|
.NOTES
|
|
Author: Atomaste Solution
|
|
Requires: Administrator privileges
|
|
Creates backup of registry keys before modification
|
|
#>
|
|
|
|
param(
|
|
[switch]$Undo, # Restore original registry values
|
|
[switch]$ListOnly # Only show current values, don't modify
|
|
)
|
|
|
|
$backupFile = "$env:USERPROFILE\solidworks-registry-backup.reg"
|
|
|
|
# Registry paths for SolidWorks settings
|
|
$regPaths = @{
|
|
HKCU_SW = "HKCU:\Software\SolidWorks"
|
|
HKLM_SW = "HKLM:\SOFTWARE\SolidWorks"
|
|
HKLM_SW_WOW = "HKLM:\SOFTWARE\WOW6432Node\SolidWorks"
|
|
}
|
|
|
|
# Settings to disable (0 = disabled, 1 = enabled typically)
|
|
$settingsToDisable = @(
|
|
@{
|
|
Description = "Customer Experience Improvement Program"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\Performance\CustomerExperienceImprovementProgram")
|
|
ValueName = "OptInStatus"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Check for Updates"
|
|
Paths = @(
|
|
"HKCU:\Software\SolidWorks\SOLIDWORKS *\General",
|
|
"HKLM:\SOFTWARE\SolidWorks\SOLIDWORKS *\General"
|
|
)
|
|
ValueName = "Auto Check for Updates"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Send Anonymous Usage Statistics"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\Performance")
|
|
ValueName = "Send Usage Statistics"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "3DEXPERIENCE Integration"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\General")
|
|
ValueName = "3DEXPERIENCE Enabled"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Show 3DEXPERIENCE Messages"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\Messages")
|
|
ValueName = "Show 3DEXPERIENCE Prompt"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Analytics Collection"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\Performance")
|
|
ValueName = "EnableAnalytics"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Telemetry"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\Performance")
|
|
ValueName = "EnableTelemetry"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
},
|
|
@{
|
|
Description = "Background Downloader"
|
|
Paths = @("HKCU:\Software\SolidWorks\SOLIDWORKS *\General")
|
|
ValueName = "Enable Background Downloader"
|
|
DisableValue = 0
|
|
EnableValue = 1
|
|
}
|
|
)
|
|
|
|
function Test-IsAdmin {
|
|
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
|
|
$principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
|
|
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
|
}
|
|
|
|
function Get-ExpandedPaths {
|
|
param([string]$PathPattern)
|
|
|
|
$results = @()
|
|
|
|
# Handle wildcard in path (e.g., "SOLIDWORKS *" for version)
|
|
if ($PathPattern -match "\*") {
|
|
$parentPath = Split-Path $PathPattern -Parent
|
|
$childPattern = Split-Path $PathPattern -Leaf
|
|
|
|
if (Test-Path $parentPath) {
|
|
$children = Get-ChildItem -Path $parentPath -ErrorAction SilentlyContinue |
|
|
Where-Object { $_.PSChildName -like $childPattern }
|
|
foreach ($child in $children) {
|
|
$results += $child.PSPath
|
|
}
|
|
}
|
|
} else {
|
|
if (Test-Path $PathPattern) {
|
|
$results += $PathPattern
|
|
}
|
|
}
|
|
|
|
return $results
|
|
}
|
|
|
|
function Backup-Registry {
|
|
Write-Host "[INFO] Creating registry backup..." -ForegroundColor Cyan
|
|
|
|
$regExportCmd = @"
|
|
Windows Registry Editor Version 5.00
|
|
|
|
; SolidWorks Privacy Lockdown - Registry Backup
|
|
; Created: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')
|
|
;
|
|
|
|
"@
|
|
|
|
foreach ($regPath in $regPaths.Values) {
|
|
$expandedPaths = Get-ExpandedPaths -PathPattern "$regPath\*"
|
|
foreach ($path in $expandedPaths) {
|
|
try {
|
|
$key = Get-Item -Path $path -ErrorAction SilentlyContinue
|
|
if ($key) {
|
|
# Note: This is a simplified backup - for full backup use reg.exe
|
|
$regExportCmd += "; Path: $path`r`n"
|
|
}
|
|
} catch { }
|
|
}
|
|
}
|
|
|
|
Set-Content -Path $backupFile -Value $regExportCmd -Force
|
|
Write-Host "[OK] Backup reference saved to: $backupFile" -ForegroundColor Green
|
|
Write-Host "[TIP] For full backup, run: reg export 'HKCU\Software\SolidWorks' backup.reg" -ForegroundColor Yellow
|
|
}
|
|
|
|
function Get-RegistryValue {
|
|
param(
|
|
[string]$Path,
|
|
[string]$Name
|
|
)
|
|
|
|
try {
|
|
$value = Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue
|
|
if ($value) {
|
|
return $value.$Name
|
|
}
|
|
} catch { }
|
|
|
|
return $null
|
|
}
|
|
|
|
function Set-RegistryValue {
|
|
param(
|
|
[string]$Path,
|
|
[string]$Name,
|
|
[int]$Value
|
|
)
|
|
|
|
try {
|
|
# Create path if it doesn't exist
|
|
if (-not (Test-Path $Path)) {
|
|
New-Item -Path $Path -Force -ErrorAction SilentlyContinue | Out-Null
|
|
}
|
|
|
|
Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type DWord -Force -ErrorAction Stop
|
|
return $true
|
|
} catch {
|
|
return $false
|
|
}
|
|
}
|
|
|
|
function Show-CurrentSettings {
|
|
Write-Host "`n=== CURRENT REGISTRY SETTINGS ===" -ForegroundColor Cyan
|
|
|
|
$found = $false
|
|
|
|
foreach ($setting in $settingsToDisable) {
|
|
Write-Host "`n$($setting.Description):" -ForegroundColor White
|
|
|
|
foreach ($pathPattern in $setting.Paths) {
|
|
$expandedPaths = Get-ExpandedPaths -PathPattern $pathPattern
|
|
|
|
if ($expandedPaths.Count -eq 0) {
|
|
Write-Host " [--] Path not found: $pathPattern" -ForegroundColor Gray
|
|
continue
|
|
}
|
|
|
|
foreach ($path in $expandedPaths) {
|
|
$found = $true
|
|
$currentValue = Get-RegistryValue -Path $path -Name $setting.ValueName
|
|
|
|
$displayPath = $path -replace "Microsoft\.PowerShell\.Core\\Registry::", ""
|
|
|
|
if ($null -eq $currentValue) {
|
|
Write-Host " [??] $displayPath" -ForegroundColor Gray
|
|
Write-Host " Value '$($setting.ValueName)' not set" -ForegroundColor Gray
|
|
} elseif ($currentValue -eq $setting.DisableValue) {
|
|
Write-Host " [OK] $displayPath" -ForegroundColor Green
|
|
Write-Host " $($setting.ValueName) = $currentValue (DISABLED)" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " [!!] $displayPath" -ForegroundColor Red
|
|
Write-Host " $($setting.ValueName) = $currentValue (ENABLED)" -ForegroundColor Red
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (-not $found) {
|
|
Write-Host "`n[INFO] No SolidWorks registry entries found." -ForegroundColor Yellow
|
|
Write-Host " This is normal if SolidWorks hasn't been run yet." -ForegroundColor Yellow
|
|
}
|
|
}
|
|
|
|
function Disable-TelemetrySettings {
|
|
Write-Host "`n=== DISABLING TELEMETRY SETTINGS ===" -ForegroundColor Cyan
|
|
|
|
$modified = 0
|
|
$skipped = 0
|
|
$failed = 0
|
|
|
|
foreach ($setting in $settingsToDisable) {
|
|
Write-Host "`n$($setting.Description):" -ForegroundColor White
|
|
|
|
foreach ($pathPattern in $setting.Paths) {
|
|
$expandedPaths = Get-ExpandedPaths -PathPattern $pathPattern
|
|
|
|
if ($expandedPaths.Count -eq 0) {
|
|
# Try to create the path for common settings
|
|
if ($pathPattern -match "HKCU:") {
|
|
Write-Host " [SKIP] Path doesn't exist (will be set when SW runs)" -ForegroundColor Gray
|
|
}
|
|
$skipped++
|
|
continue
|
|
}
|
|
|
|
foreach ($path in $expandedPaths) {
|
|
$displayPath = $path -replace "Microsoft\.PowerShell\.Core\\Registry::", ""
|
|
$currentValue = Get-RegistryValue -Path $path -Name $setting.ValueName
|
|
|
|
if ($currentValue -eq $setting.DisableValue) {
|
|
Write-Host " [SKIP] Already disabled: $displayPath" -ForegroundColor Gray
|
|
$skipped++
|
|
continue
|
|
}
|
|
|
|
$success = Set-RegistryValue -Path $path -Name $setting.ValueName -Value $setting.DisableValue
|
|
|
|
if ($success) {
|
|
Write-Host " [OK] Disabled: $displayPath" -ForegroundColor Green
|
|
$modified++
|
|
} else {
|
|
Write-Host " [FAIL] Could not modify: $displayPath" -ForegroundColor Red
|
|
$failed++
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Write-Host "`n[SUMMARY] Modified: $modified | Skipped: $skipped | Failed: $failed" -ForegroundColor White
|
|
}
|
|
|
|
function Enable-TelemetrySettings {
|
|
Write-Host "`n=== RESTORING TELEMETRY SETTINGS ===" -ForegroundColor Cyan
|
|
|
|
foreach ($setting in $settingsToDisable) {
|
|
Write-Host "`n$($setting.Description):" -ForegroundColor White
|
|
|
|
foreach ($pathPattern in $setting.Paths) {
|
|
$expandedPaths = Get-ExpandedPaths -PathPattern $pathPattern
|
|
|
|
foreach ($path in $expandedPaths) {
|
|
$displayPath = $path -replace "Microsoft\.PowerShell\.Core\\Registry::", ""
|
|
$success = Set-RegistryValue -Path $path -Name $setting.ValueName -Value $setting.EnableValue
|
|
|
|
if ($success) {
|
|
Write-Host " [OK] Restored: $displayPath" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " [FAIL] Could not restore: $displayPath" -ForegroundColor Red
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
# Main execution
|
|
if (-not (Test-IsAdmin)) {
|
|
Write-Host "[ERROR] This script requires Administrator privileges." -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
Write-Host " SolidWorks Registry Configurator" -ForegroundColor Cyan
|
|
Write-Host " Atomaste Solution" -ForegroundColor Cyan
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
|
|
if ($ListOnly) {
|
|
Show-CurrentSettings
|
|
Write-Host "`n[TIP] Run without -ListOnly to disable telemetry" -ForegroundColor Yellow
|
|
} elseif ($Undo) {
|
|
Write-Host "`n[ACTION] Restoring original settings..." -ForegroundColor Yellow
|
|
Enable-TelemetrySettings
|
|
Show-CurrentSettings
|
|
} else {
|
|
Write-Host "`n[ACTION] Disabling telemetry and update settings..." -ForegroundColor Yellow
|
|
Backup-Registry
|
|
Disable-TelemetrySettings
|
|
Show-CurrentSettings
|
|
}
|
|
|
|
Write-Host "`n[NOTE] Some settings may only appear after running SolidWorks." -ForegroundColor Yellow
|
|
Write-Host " Re-run this script after first launch if needed." -ForegroundColor Yellow
|
|
Write-Host "`n[DONE] Script completed." -ForegroundColor Green
|