[resolved] Howto use a "winget" command via "Opsi" ?

Antworten
bourhis
Beiträge: 145
Registriert: 07 Nov 2012, 15:57

[resolved] Howto use a "winget" command via "Opsi" ?

Beitrag von bourhis »

Hi,

if I execute interactively in a command or powershell prompt :

Code: Alles auswählen

winget uninstall "windows web experience pack" --silent --accept-source-agreements --disable-interactivity
the widget is properly (and silently) uninstall.

If I try to do it in a [Dosbatch] or [ExecWith_powershell] Opsi section I see in "log" file an error message stating that "winget" cannot be found.

Is there a solution ?

Regards.
Zuletzt geändert von bourhis am 07 Sep 2026, 10:04, insgesamt 1-mal geändert.
Benutzeravatar
j.werner
uib-Team
Beiträge: 92
Registriert: 08 Okt 2019, 13:32

Re: Howto use a "winget" command via "Opsi" ?

Beitrag von j.werner »

Hi,

which architecture (32bit/64bit/arm64) the winget binary has?

Maybe calling the section with a modifier e.g. /64bit could help.

For Example
Dosbatch... WINST /64bit


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


bourhis
Beiträge: 145
Registriert: 07 Nov 2012, 15:57

Re: Howto use a "winget" command via "Opsi" ?

Beitrag von bourhis »

Hi,

I tried this option without any more success...

Regards
bourhis
Beiträge: 145
Registriert: 07 Nov 2012, 15:57

Re: Howto use a "winget" command via "Opsi" ?

Beitrag von bourhis »

Hello,

I can work around the problem by running a “PowerShell” script in a “Dosbatch” section:

Code: Alles auswählen

PowerShell.exe -ExecutionPolicy Unrestricted -command “%ScriptPath%\widgets.ps1”
where the script simply contains (for example):

Code: Alles auswählen

winget uninstall “Windows Web Experience Pack” --silent --accept-source-agreements --disable-interactivity
Best regards.
Antworten