rubberduck-vba / Rubberduck3

COM add-in for the VBIDE
GNU General Public License v3.0
89 stars 17 forks source link

Powershell script to Toggle between RD2 and RD3 registry configurations #61

Closed BZngr closed 1 year ago

BZngr commented 1 year ago

Closes #36

The Powershell (PS) script provided by this PR probably does not belong where I've placed it in the Rubberduck3 code base. That said, I do not have a better place to suggest.

The script contains PS help content that describes the script in detail, so I will not repeat it here. The help content can be viewed either at the bottom of the PR's .ps1 file or by invoking the script's help content from a PS session with something like: Get-Help .\SetRegistryForRDVersion.ps1, (or Get-Help .\SetRegistryForRDVersion.ps1 -full to get everything)

Note: Running the script requires a PS session opened with Administrative privileges.

Disclaimer: This PS script was written by an absolute PS newbie. So, packaging it as a single script file is probably not optimal. I imagine it should be provided as a PS module, but doing so is beyond my current skill set. I felt it was better to provide this initial version, in this format, sooner than later.

The script makes extensive use of the -WhatIf switch parameter in order to help with review/testing. The -WhatIf switch parameter allows the user to run the script and see what it does without making changes to the registry.

BZngr commented 1 year ago

A bit more information: SetRegistryForRDVersion.ps1 is the result of merging 2 .ps1 files from a GitHub project which can be found here.