You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for my feature proposal and not found a work-in-progress/duplicate/resolved/discarded issue.
This proposal is a completely new feature. If you want to suggest an improvement or an enhancement, please use this template
Describe the new feature
Allow users to set a script, to update from, when an update is available.
This would be useful for modified apps like "block the spot" and "better discord".
*User installs app
*User adds custom update variables
*Winget finds update for app "app"
*User checks and selects "update selected packages"
*Custom update script is ran
Describe how this new feature could help users.
It will stop functionality break, and make updating moded apps more convenient.
This kind-of already exists via "custom command line argument", but it's not as simple as copy pasting the powershell script from block the spot's readme....
If there's an easy way to tell it to skip udpating from repo and instead running the script via the existing interface lmk.
So far it seems more convenient to run the powershell script on start up. Than it is to run it via winget.
Ya, I guess.
For example block the spot just uses: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-Expression "& { $(Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/mrpond/BlockTheSpot/master/install.ps1') } -UninstallSpotifyStoreEdition -UpdateSpotify"
I'd need to run this every time I update spotify. Or download the .dll and drop it in the spotify folder every time there's an update to spotify. Just a minor inconvenience.
Same with better discord, a discord update often needs a reinstall of better discord.
Also would be convenient if you could right click apps in the installed list to go to the app folder. I assume the current logging could already see the output folder[s]? It also seems wingetui checks against the registry, which registry has the installed folder.
Also would be convenient if you could right click apps in the installed list to go to the app folder. I assume the current logging could already see the output folder[s]? It also seems wingetui checks against the registry, which registry has the installed folder
This is not true. There is no viable way of getting the install location from WingetUI.
Regarding the feature, it could be done, i don't see why not
This is not true. There is no viable way of getting the install location from WingetUI.
Well for example the %LocalAppData%\Programs\WingetUI\choco-cli\logs writes SOME install locations "2023-07-29 00:09:27,786 8424 [INFO ] - Software installed to 'C:\Program Files\Proton\VPN'" Also obviously the windows registry has install locations.
Querying the choco log for software locations and caching the locations would be fairly simple
This is not true. There is no viable way of getting the install location from WingetUI.
Well for example the %LocalAppData%\Programs\WingetUI\choco-cli\logs writes SOME install locations "2023-07-29 00:09:27,786 8424 [INFO ] - Software installed to 'C:\Program Files\Proton\VPN'" Also obviously the windows registry has install locations. Querying the choco log for software locations and caching the locations would be fairly simple
Ok, let's assume we get the paths of all the chocolatey packages. How do we get the winget ones? and the scoop ones? they don't use logs from where locations can be extracted...
Ok, let's assume we get the paths of all the chocolatey packages. How do we get the winget ones? and the scoop ones? they don't use logs from where locations can be extracted...
Does scoop not put all packages in %userprofile%\scoop\apps ? So just parse the name of the scoop app from that dir?
Would really like post-install update scripts, or even just the ability to run a specific command after install to be able to call a batch file. For example "Git For Windows" adds a couple of stupid context menu entries on every update, and I have a batch script I have to run that removes the registry entries for it. Would be nice to have this automatic.
I see in #2160 someone requested the same thing but that was marked as a duplicate but it's really not, it's subtly different from this one which is for entire update scripts. Post-update scripts should be much easier to implement since it's totally separate from the installation process.
For example "Git For Windows" adds a couple of stupid context menu entries on every update
I avoid this context menus by installing git with custom parameters like this winget install --no-upgrade --scope machine -h --accept-package-agreements --accept-source-agreements Git.Git --custom '"/COMPONENTS="icons,assoc,assoc_sh,,,,gitlfs,icons\quicklaunch" /o:SSHOption=ExternalOpenSSH"
I have published a PreRelease version of UniGetUI that allows to specify pre/post install/update/uninstall commands/scripts. I'd appreciate if you could test it and provide some feedback.
Activity
Chaython commentedon Jul 19, 2023
This kind-of already exists via "custom command line argument", but it's not as simple as copy pasting the powershell script from block the spot's readme....
If there's an easy way to tell it to skip udpating from repo and instead running the script via the existing interface lmk.
So far it seems more convenient to run the powershell script on start up. Than it is to run it via winget.
Perhaps this is similar to #1117
But I really just want to ignore, existing winget etc, and on 'update found' trigger powershell script
marticliment commentedon Jul 29, 2023
So, you mean something like custom post-install scripts?
Chaython commentedon Jul 31, 2023
Ya, I guess.
For example block the spot just uses:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-Expression "& { $(Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/mrpond/BlockTheSpot/master/install.ps1') } -UninstallSpotifyStoreEdition -UpdateSpotify"I'd need to run this every time I update spotify. Or download the .dll and drop it in the spotify folder every time there's an update to spotify. Just a minor inconvenience.
Same with better discord, a discord update often needs a reinstall of better discord.
Also would be convenient if you could right click apps in the installed list to go to the app folder. I assume the current logging could already see the output folder[s]? It also seems wingetui checks against the registry, which registry has the installed folder.
marticliment commentedon Jul 31, 2023
This is not true. There is no viable way of getting the install location from WingetUI.
Regarding the feature, it could be done, i don't see why not
Chaython commentedon Jul 31, 2023
Well for example the %LocalAppData%\Programs\WingetUI\choco-cli\logs writes SOME install locations "2023-07-29 00:09:27,786 8424 [INFO ] - Software installed to 'C:\Program Files\Proton\VPN'" Also obviously the windows registry has install locations.
Querying the choco log for software locations and caching the locations would be fairly simple
`$LogPath = "$env:LocalAppData\Programs\WingetUI\choco-cli\logs\chocolatey.log"
$SearchString = "Software installed to "
$OutputFile = "Software install location.log"
Get-ChildItem $LogPath -Filter .log | ForEach-Object {
$Content = Get-Content $_.FullName
$Matches = [regex]::Matches($Content, "$SearchString'([^'])'")
foreach ($Match in $Matches) {
$InstallLocation = $Match.Groups[1].Value
Add-Content $OutputFile $InstallLocation
}
}
`
marticliment commentedon Aug 1, 2023
Ok, let's assume we get the paths of all the chocolatey packages. How do we get the winget ones? and the scoop ones? they don't use logs from where locations can be extracted...
Chaython commentedon Aug 1, 2023
Does scoop not put all packages in %userprofile%\scoop\apps ? So just parse the name of the scoop app from that dir?
ppvnf commentedon Aug 1, 2023
this seems to be an open issue for Winget tho microsoft/winget-cli#2298
Chaython commentedon Aug 1, 2023
Seems relevant but exclusively pertaining to winget
Chaython commentedon Aug 1, 2023
Get-WmiObject -Class Win32_Product | Select-Object Name, InstallLocation
will also display install locations of a few apps
ThioJoe commentedon Jun 6, 2024
Would really like post-install update scripts, or even just the ability to run a specific command after install to be able to call a batch file. For example "Git For Windows" adds a couple of stupid context menu entries on every update, and I have a batch script I have to run that removes the registry entries for it. Would be nice to have this automatic.
I see in #2160 someone requested the same thing but that was marked as a duplicate but it's really not, it's subtly different from this one which is for entire update scripts. Post-update scripts should be much easier to implement since it's totally separate from the installation process.
soredake commentedon Jun 7, 2024
I avoid this context menus by installing git with custom parameters like this
winget install --no-upgrade --scope machine -h --accept-package-agreements --accept-source-agreements Git.Git --custom '"/COMPONENTS="icons,assoc,assoc_sh,,,,gitlfs,icons\quicklaunch" /o:SSHOption=ExternalOpenSSH"marticliment commentedon Jun 20, 2025
Hello,
I have published a PreRelease version of UniGetUI that allows to specify pre/post install/update/uninstall commands/scripts. I'd appreciate if you could test it and provide some feedback.
Thanks!
Download link: https://github.com/marticliment/UniGetUI/releases/tag/3.2.1-beta1