[wpkg-users] In memory of WMIC...

Dafydd Jones (techneg.it) dafydd at techneg.it
Wed Feb 4 19:44:54 CET 2026


It seems that you need to set:

$ProgressPreference = 'SilentlyContinue'


to prevent the progress bar from showing.


HTH,

Dafydd



On Wed, 4 Feb 2026 at 17:45, Marco Gaiarin <gaio at lilliput.linux.it> wrote:

>
> Mandi! Andreas Habel
>   In chel di` si favelave...
>
> > There are different approaches to solve this - the easiest would be this
> PowerShell command:
> >       Get-Package -Name "<application name>" | Uninstall-Package
>
> Exactly what i've found.
>
>
> > However, the command shows a progress bar when run in a command line
> window, something that WPKG does not like, and I was not able to find a way
> to suppress the output.
>
> True that even with an '| Out-Null' at the end the progress bar get
> displayed, but i've not trouble with this... seems to work, at least with
> MSI, as expected...
>
>
> > What I am doing now for all MSI packages is the following:
> > - In my WPKG package xml file, I call a PowerShell script:
> >       '%COMSPEC% /C powershell.exe %WINDIR%\uis\temp\uis-uninstall.ps1
> -appname "'%PROGNAME%'"'
>
> Normally i run powershell without the '%COMSPEC% /C', eg without running
> them on a CMD shell jail...
>
> > - In the PowerShell script, I run:
> >       $uninstallData=Get-ChildItem -Path
> "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" |
> Get-ItemProperty | Where-Object { $_.DisplayName -match "$appname" } |
> Select-Object -Property UninstallString
> >       with $appname being the option -appname you called the script with
> > - $uninstallData has the property UninstallString that contains whatever
> is in the registry under UninstallString
> > - Since the UninstallString value in the registry often contains an
> install string (MsiExec /I instead of MsiExec /X), you will need to extract
> the GUID
> > - In the next step, you can uninstall like this:
> >       $Arguments = @(
> >         "/X"
> >         "$guid"
> >         "/qn"
> >       )
> >       $MSIExec = (Start-Process -FilePath
> "C:\Windows\System32\msiexec.exe" -ArgumentList $Arguments -Wait
> -Passthru).ExitCode
>
> Seems complicated... anyway, thanks.
>
> --
>
> ---------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20260204/fb1eed24/attachment.html>


More information about the wpkg-users mailing list