Skip to content

Enhancements to input validation, registry management, and documentation #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

kynoptic
Copy link

Introducing a set of improvements to enhance user experience and tool reliability:

  1. Input validation:

    • Registry paths are now verified at the start using Test-Path. If absent, they're created with New-Item -Path $RegistryPath -Force.
    • Revamped validation for prompts: Removed abrupt exits, replaced with validation loops for better user input correction, with an option to exit the script anytime.
  2. Multiple program handling:

    • Added entry management for separate registry keys, improving adaptability.
    • Users can now view all configurations and selectively remove entries or clear all.
  3. Documentation:

    • The README has been expanded for better user guidance.

Let me know if you have any questions!

kynoptic added 4 commits September 20, 2023 13:37
1. Enhance registry path handling:
   - Check if the registry path exists at the start of the script using `Test-Path`.
   - If the path does not exist, it is created using `New-Item -Path $RegistryPath -Force`.

2. Improve user input validation for the "Action" and "Choice" prompts:
   - Removed the abrupt `exit` command which was used on an invalid choice.
   - Implemented while loops to validate user inputs, allowing users to correct their inputs without restarting the script.

BREAKING CHANGE: The `exit` command was removed to prevent the script from terminating abruptly on invalid inputs, potentially breaking any reliance on the older abrupt exit behavior.
- Added individual `.exe` entry management, enabling users to create separate registry keys for different `.exe` files and enhancing configuration flexibility.
- Introduced the functionality to list all existing entries, allowing users to view all their current configurations.
- Expanded the removal functionality to allow users to select specific entries to remove or to remove all entries at once, providing finer control over registry management.
- Resolved the issue where users couldn't remove a registry entry by selecting its corresponding number.
- Ensured that full details of each registry entry are fetched using `Get-Item -LiteralPath $SubKey.PSPath` before prompting the user for their choice of entry to remove.
- Provided the option for the user to exit the script at any point by entering 'x'.
@kynoptic kynoptic closed this by deleting the head repository Aug 7, 2025
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