-
Notifications
You must be signed in to change notification settings - Fork 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
[Feature] Update registry entries #1
Comments
I'm not sure what you mean by "registry entries". |
I meant the Windows registry. Currently, my EXE file is creating a registry entry at HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\CurrencyConverter\DisplayVersion. It would be great if the updater could update the version here during the update. |
This project has no idea about Windows Registry updates. However, your plugin can listen to the Line 24 in 08da574
Example: Community.PowerToys.Run.Plugin.Update/samples/Community.PowerToys.Run.Plugin.Sample/Main.cs Lines 191 to 195 in 08da574
☝️ Add updates to the Registry here. |
I don't think a system-level modification for an update should be handled in the plugin itself, and I believe elevation is also required to run it, making it more suitable to be done at an updater level. # rest of the code
Write-Log "Extract release"
$parent = Split-Path -Path $pluginDirectory -Parent
Expand-Archive -Path $release -DestinationPath $parent -Force
Write-Log "Update registry version"
$registryPath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\$name"
if (Test-Path $registryPath) {
Set-ItemProperty -Path $registryPath -Name "DisplayVersion" -Value $newVersion
Write-Log "Registry version updated to $newVersion"
}
else {
Write-Warning "Registry path not found: $registryPath"
} |
I don't think this project should know anyting about the Windows Registry. I'm open for a way for plugin authors to include a post upgrade script that is invoked at the end of For example:
Line 14 in 08da574
Line 261 in 08da574
Community.PowerToys.Run.Plugin.Update/src/Community.PowerToys.Run.Plugin.Update/update.ps1 Lines 119 to 121 in 08da574
Perhaps support for a pre upgrade script would also be of interest to plugin authors!? |
I am currently using this for my currency converter plugin, and it works wonderfully. I just have one suggestion: please update the registry entries. I am adding a system registry entry during installation, which allows users to quickly uninstall the plugin and view its details through the Control Panel or the Installed Apps page in Settings. Therefore, during updates, it would be beneficial if the updater could modify this registry entry to reflect the new version.
Thank you!
The text was updated successfully, but these errors were encountered: