Skip to content

Commit 3825aa3

Browse files
committed
version update
Implemented first-pass attempt at COM Binary Compatibility to smooth out installation issues Removed dependency on Bill Stewart's UninsIS DLL by rewriting uninstall workflow in native Inno Setup pascal Added analize_registry.ps1 powershell script to Utilities folder for debugging install issues
1 parent 3577253 commit 3825aa3

33 files changed

Lines changed: 790 additions & 611 deletions

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 GCUser99
3+
Copyright (c) 2024-2025 GCUser99
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ The SolverWrapper's ActiveX DLL Object Model in VBA's Object Browser:
8989

9090
[twinBASIC](https://twinbasic.com/preview.html) by Wayne Phillips
9191

92-
[Inno Setup](https://jrsoftware.org/isinfo.php) by Jordan Russell and [UninsIS](https://github.com/Bill-Stewart/UninsIS) by Bill Stewart
93-
92+
[Inno Setup](https://jrsoftware.org/isinfo.php) by Jordan Russell
9493

9594

9695

dist/SolverWrapperDLLSetup.exe

59.9 KB
Binary file not shown.

src/Utilities/analize_registry.ps1

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# This script will scan the registry for all keys associated with install,
2+
# create a log file, and optionally delete them (not recommended - uninstall via Inno Setup unins000.exe)
3+
4+
$ProgID = "SolverWrapper"
5+
$GuidPrefix = "71A00FE4-A1D4-47C3-BC7A-"
6+
$LogPath = ".\COM_Registry_Log.txt"
7+
$Delete = $false
8+
9+
$ProgIDPattern = "$ProgID.*"
10+
11+
$log = New-Object System.Collections.Generic.List[string]
12+
function Log($msg) {
13+
$timestamped = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') $msg"
14+
$log.Add($timestamped)
15+
Add-Content -Path $LogPath -Value $timestamped
16+
Write-Host $timestamped
17+
}
18+
19+
function MatchKeys($basePath, $pattern) {
20+
Log "Scanning: $basePath with pattern: $pattern"
21+
try {
22+
$items = Get-ChildItem -Path "Registry::$basePath" -ErrorAction SilentlyContinue
23+
$matches = $items | Where-Object {
24+
$_.PSChildName -match "^$pattern" -or $_.PSChildName -match "^\{$pattern"
25+
} | ForEach-Object { $_.Name }
26+
Log "Matched $($matches.Count) keys"
27+
return $matches
28+
} catch {
29+
Log "Failed to scan: $basePath - $_"
30+
return @()
31+
}
32+
}
33+
34+
function DeleteKey($keyPath) {
35+
try {
36+
Remove-Item -Path "Registry::$keyPath" -Recurse -Force -ErrorAction Stop
37+
Log "Deleted: $keyPath"
38+
} catch {
39+
Log "Failed to delete: $keyPath - $_"
40+
}
41+
}
42+
43+
# Registry hives to scan
44+
$hives = @(
45+
"HKCR",
46+
"HKCR\WOW6432Node",
47+
"HKCU\Software\Classes",
48+
"HKCU\Software\Classes\Wow6432Node",
49+
"HKCU\Software\Wow6432Node",
50+
"HKLM\Software\Classes",
51+
"HKLM\Software\Classes\WOW6432Node",
52+
"HKLM\Software\WOW6432Node\Classes"
53+
)
54+
55+
#"Software\Classes\TypeLib"
56+
57+
# Targets to match
58+
$targets = @(
59+
@{ Path = ""; Pattern = $ProgIDPattern },
60+
@{ Path = "CLSID"; Pattern = "$GuidPrefix*" },
61+
@{ Path = "Interface"; Pattern = "$GuidPrefix*" },
62+
@{ Path = "TypeLib"; Pattern = "$GuidPrefix*" }
63+
)
64+
65+
foreach ($hive in $hives) {
66+
foreach ($target in $targets) {
67+
$base = if ($target.Path -eq "") { $hive } else { "$hive\$($target.Path)" }
68+
$matches = MatchKeys $base $target.Pattern
69+
foreach ($match in $matches) {
70+
Log "Found: $match"
71+
if ($Delete) { DeleteKey $match }
72+
}
73+
}
74+
}
75+
76+
# Detect Office version from Excel and Access
77+
function Get-OfficeVersion($app) {
78+
$key = "HKCU:\Software\Microsoft\Office"
79+
$versions = Get-ChildItem -Path $key -ErrorAction SilentlyContinue |
80+
Where-Object { $_.PSChildName -match '^\d+\.\d+$' } |
81+
Sort-Object -Property PSChildName -Descending
82+
83+
foreach ($version in $versions) {
84+
$testPath = "$key\$($version.PSChildName)\$app\Security\Trusted Locations\$ProgID"
85+
if (Test-Path -Path $testPath) {
86+
return $version.PSChildName
87+
}
88+
}
89+
return $null
90+
}
91+
92+
# Delete Trusted Location key
93+
function FindTrustedLocation($app) {
94+
$version = Get-OfficeVersion $app
95+
if ($version) {
96+
$keyPath = "HKCU:\Software\Microsoft\Office\$version\$app\Security\Trusted Locations\$ProgID"
97+
if (Test-Path -Path $keyPath) {
98+
Log "Found Trusted Location: $keyPath"
99+
if ($Delete) {
100+
try {
101+
Remove-Item -Path $keyPath -Recurse -Force -ErrorAction Stop
102+
Log "Deleted Trusted Location: $keyPath"
103+
} catch {
104+
Log "Failed to delete $keyPath - $_"
105+
}
106+
}
107+
} else {
108+
Log "No Trusted Location found for $app {$version}: $keyPath"
109+
}
110+
111+
} else {
112+
Log "No Trusted Location found for $app"
113+
}
114+
}
115+
116+
# Run cleanup
117+
FindTrustedLocation "Excel"
118+
FindTrustedLocation "Access"
119+
120+
121+
# Save log to file
122+
$log | Out-File -FilePath $LogPath -Encoding UTF8
123+
Log "Log saved to: $LogPath"

src/VBA/ClassFactory.bas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Attribute VB_Description = "This class is used for object instantiation when ref
33
'@ModuleDescription "This class is used for object instantiation when referencing SolverWrapper externally from another VBA project"
44
'@folder("SolverWrapper.Source")
55
' ==========================================================================
6-
' SolverWrapper v1.1
6+
' SolverWrapper v1.2
77
'
88
' A wrapper for automating MS Excel's Solver Add-in
99
'
@@ -15,7 +15,7 @@ Attribute VB_Description = "This class is used for object instantiation when ref
1515
' ==========================================================================
1616
' MIT License
1717
'
18-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
18+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
1919
'
2020
' Permission is hereby granted, free of charge, to any person obtaining a copy
2121
' of this software and associated documentation files (the "Software"), to deal

src/VBA/SolvConstraints.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "A class to set/manage Solver constraints."
1212
'@Exposed
1313
'@folder("SolverWrapper.Source")
1414
' ==========================================================================
15-
' SolverWrapper v1.1
15+
' SolverWrapper v1.2
1616
'
1717
' A wrapper for automating MS Excel's Solver Add-in
1818
'
@@ -24,7 +24,7 @@ Attribute VB_Description = "A class to set/manage Solver constraints."
2424
' ==========================================================================
2525
' MIT License
2626
'
27-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
27+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
2828
'
2929
' Permission is hereby granted, free of charge, to any person obtaining a copy
3030
' of this software and associated documentation files (the "Software"), to deal
@@ -285,7 +285,7 @@ Private Sub ProcessConstraintParams(ByRef cellRef As Variant, ByVal relation As
285285

286286
If relation > 3 Then
287287
'LHS MUST refer to the decision variables
288-
'and thus dose not count against the 100-cell constraint limit
288+
'and thus does not count against the 100-cell constraint limit
289289
If Not NameExists("solver_adj", ws) Then
290290
Err.Raise vbObjectError + 4001, , "Cannot set constraint relations slvInt, slvBin, or slvAllDif, until after the decision variables are defined."
291291
End If

src/VBA/SolvDLL.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Attribute VB_Description = "This private class is used to communicate directly w
1111
'@ModuleDescription "This private class is used to communicate directly with DLL and is not exposed to User."
1212
'@folder("SolverWrapper.Source")
1313
' ==========================================================================
14-
' SolverWrapper v1.1
14+
' SolverWrapper v1.2
1515
'
1616
' A wrapper for automating MS Excel's Solver Add-in
1717
'
@@ -23,7 +23,7 @@ Attribute VB_Description = "This private class is used to communicate directly w
2323
' ==========================================================================
2424
' MIT License
2525
'
26-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
26+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
2727
'
2828
' Permission is hereby granted, free of charge, to any person obtaining a copy
2929
' of this software and associated documentation files (the "Software"), to deal

src/VBA/SolvDecisionVars.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "A class to define the Decision variable, i.e. the ce
1212
'@Exposed
1313
'@folder("SolverWrapper.Source")
1414
' ==========================================================================
15-
' SolverWrapper v1.1
15+
' SolverWrapper v1.2
1616
'
1717
' A wrapper for automating MS Excel's Solver Add-in
1818
'
@@ -24,7 +24,7 @@ Attribute VB_Description = "A class to define the Decision variable, i.e. the ce
2424
' ==========================================================================
2525
' MIT License
2626
'
27-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
27+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
2828
'
2929
' Permission is hereby granted, free of charge, to any person obtaining a copy
3030
' of this software and associated documentation files (the "Software"), to deal

src/VBA/SolvObjective.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "A class to define the Solver Objective function."
1212
'@Exposed
1313
'@folder("SolverWrapper.Source")
1414
' ==========================================================================
15-
' SolverWrapper v1.1
15+
' SolverWrapper v1.2
1616
'
1717
' A wrapper for automating MS Excel's Solver Add-in
1818
'
@@ -24,7 +24,7 @@ Attribute VB_Description = "A class to define the Solver Objective function."
2424
' ==========================================================================
2525
' MIT License
2626
'
27-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
27+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
2828
'
2929
' Permission is hereby granted, free of charge, to any person obtaining a copy
3030
' of this software and associated documentation files (the "Software"), to deal

src/VBA/SolvOptions.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Attribute VB_Description = "A class to set Solver Options."
1212
'@Exposed
1313
'@folder("SolverWrapper.Source")
1414
' ==========================================================================
15-
' SolverWrapper v1.1
15+
' SolverWrapper v1.2
1616
'
1717
' A wrapper for automating MS Excel's Solver Add-in
1818
'
@@ -24,7 +24,7 @@ Attribute VB_Description = "A class to set Solver Options."
2424
' ==========================================================================
2525
' MIT License
2626
'
27-
' Copyright (c) 2024, GCUser99 (https://github.com/GCuser99/SolverWrapper)
27+
' Copyright (c) 2024-2025, GCUser99 (https://github.com/GCuser99/SolverWrapper)
2828
'
2929
' Permission is hereby granted, free of charge, to any person obtaining a copy
3030
' of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)