Skip to content

Add registry-backup gating (SAFE mode) and minor robustness improvements#6

Draft
TantalusDrive wants to merge 15 commits intoptrumpis:mainfrom
TantalusDrive:tantalus-patches
Draft

Add registry-backup gating (SAFE mode) and minor robustness improvements#6
TantalusDrive wants to merge 15 commits intoptrumpis:mainfrom
TantalusDrive:tantalus-patches

Conversation

@TantalusDrive
Copy link
Contributor

@TantalusDrive TantalusDrive commented Feb 4, 2026

Hi!
Following up on the previous improvements, this PR focuses mainly on making both scripts safer in environments where registry recovery may not be available, while keeping the original behavior intact.

  • Batch script
    Registry modifications are now gated on the presence of automatic registry backups. If backups are not detected, the script runs in SAFE mode and skips registry writes, with an interactive option to enable registry backups if the user wants to proceed.
    While touching this area, the bitness selection logic was also slightly simplified and hardened to reduce edge cases in mixed or versioned AMD ICD setups.

  • PowerShell script
    The same safety model is applied here as well, using RegBack detection and an optional attempt to enable it automatically. Destructive registry operations are skipped when backups are not available, keeping the script non-destructive by default.

  • README
    Updated to document the safety model, clarify default behaviors (including unsigned DLL handling), and better distinguish main functionality from PowerShell-specific extensions.

Let me know if you’d prefer any of this split out or adjusted.

Batch
ptrumpis_screenshot1

PowerShell
(coming soon)

- SAFE mode:
Registry modifications are performed only if automatic registry backup (EnablePeriodicBackup) is active. If it’s not enabled, the script offers the user the option to turn it on before proceeding, reducing the risk of irreversible changes.

- Improved diagnostics / extended echo:
Echo messages provide clearer feedback for added keys, already registered DLLs, and operations skipped in SAFE mode. Enhances transparency of actions without repeating information.
SAFE mode / registry gating:
- Destructive registry operations only executed if evidence of automatic registry backups is present (RegBack files or scheduled task).
- Offers user the option to enable RegBack automatically (EnablePeriodicBackup DWORD + RegIdleBackup task).

Diagnostics / transparency:
- Messages for skipped destructive actions, invalid signatures, removed or moved entries, and successful registrations.
- Provides clearer feedback on registry reconciliation and DLL registration.

DLL handling improvements:
- Accepts any amdocl*.dll variant, including custom-built ICDs.
- Bitness detection simplified and stabilized; ensures 32/64-bit registry placement is consistent.

Additional safety:
- Authenticode signature verification added (optional $AllowUnsigned for legacy GPUs).
- Non-destructive unless SAFE mode permits.
- Reworded main paragraph highlighting detection, SysWOW64 handling, PATH scan, status output, versioned/custom ICD support, and registry writes gated on automatic backups.
- Updated PowerShell section to emphasize added features only: signature verification, precise 32/64-bit detection, safe cleanup/relocation of invalid entries, DriverStore handling, more detailed output, and optional automatic registry backup enabling.
- Clarified -AllowUnsigned option behavior for PowerShell script.
- Minor wording improvements for clarity and flow.
- More robust detection of administrative privileges and Windows version.
- Explicit handling of SysWOW64 in addition to System32.
- Improved 32/64-bit ICD registration heuristics to reduce misclassification.
- Support for versioned AMD OpenCL DLL variants already used by some drivers.
- Prevention of duplicate registry entries.
- Introduction of a SAFE mode that skips registry modifications when automatic registry backups are not available or enabled.
- Restored and expanded user-facing output to clearly report detections, registrations, skipped operations, and SAFE mode status.
Using fsutil instead o net session for more reliable privilege check
@TantalusDrive TantalusDrive reopened this Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant