Discussion:
[wpkg-users] Remove Windows Apps
Ronnie Carlos Tavares Nunes
2018-03-28 17:48:49 UTC
Permalink
Hi,

I'm trying do run a package that disable some apps from Windows 10. So
I'm using this:

   <install cmd='powershell -noninteractive Get-AppxPackage -allusers
*windowsalarms* | Remove-AppxPackage' />

When I run it manually, in the command line with administrative
privileges its ok. On Wpkg, it executes with no errors but the Apps are
not uninstalled.

Any ideas?

Regards,

Ronnie.

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Stefan Pendl
2018-03-28 21:56:58 UTC
Permalink
Am 28.03.2018 um 19:48 schrieb Ronnie Carlos Tavares Nunes:
> Hi,
>
> I'm trying do run a package that disable some apps from Windows 10. So
> I'm using this:
>
>    <install cmd='powershell -noninteractive Get-AppxPackage -allusers
> *windowsalarms* | Remove-AppxPackage' />
>
> When I run it manually, in the command line with administrative
> privileges its ok. On Wpkg, it executes with no errors but the Apps are
> not uninstalled.
>
> Any ideas?

I think you also need to use the -ExecutionPolicy command line switch
and especially the -Command switch to overcome some limitations that
PowerShell is exposing.
In addition I would try to run it inside of a command prompt by using:
cmd="%ComSpec% /c powershell ...".


--
*Stefan P.*

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Ronnie Carlos
2018-03-29 00:50:38 UTC
Permalink
Hi,

I'm trying do run a package that disable some apps from Windows 10. So I'm tried this command line:

 <install cmd='powershell -noninteractive Get-AppxPackage -allusers *windowsalarms* | Remove-AppxPackage' />

When I run it manually, in the command line with administrative privileges its ok. On Wpkg, it executes with no errors but the Apps are
not uninstalled.

Any ideas?

Regards,

Ronnie.

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Mike Burgener
2018-04-25 06:06:23 UTC
Permalink
Hi Ronnie,

IS UAC active? If so, try to disable UAC and retry.

Kind regards

Mike

> -----Ursprüngliche Nachricht-----
> Von: wpkg-users [mailto:wpkg-users-***@lists.wpkg.org] Im Auftrag von
> Ronnie Carlos
> Gesendet: Donnerstag, 29. März 2018 02:51
> An: wpkg-***@lists.wpkg.org
> Betreff: [wpkg-users] Remove Windows Apps
>
> Hi,
>
> I'm trying do run a package that disable some apps from Windows 10. So I'm
> tried this command line:
>
>  <install cmd='powershell -noninteractive Get-AppxPackage -allusers
> *windowsalarms* | Remove-AppxPackage' />
>
> When I run it manually, in the command line with administrative privileges its
> ok. On Wpkg, it executes with no errors but the Apps are not uninstalled.
>
> Any ideas?
>
> Regards,
>
> Ronnie.
>
> ---------------------------------
> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-***@lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Ronnie Carlos
2018-04-25 13:05:08 UTC
Permalink
Thanks. I will try do this. After, I will post the result.

Regards,

Ronnie.



-------- Mensagem original --------
De: Mike Burgener <***@caritas.ch>
Data: 25/04/18 03:06 (GMT-03:00)
Para: Ronnie Carlos <***@hotmail.com>, wpkg-***@lists.wpkg.org
Assunto: AW: Remove Windows Apps

Hi Ronnie,

IS UAC active? If so, try to disable UAC and retry.

Kind regards

Mike

> -----Ursprüngliche Nachricht-----
> Von: wpkg-users [mailto:wpkg-users-***@lists.wpkg.org] Im Auftrag von
> Ronnie Carlos
> Gesendet: Donnerstag, 29. März 2018 02:51
> An: wpkg-***@lists.wpkg.org
> Betreff: [wpkg-users] Remove Windows Apps
>
> Hi,
>
> I'm trying do run a package that disable some apps from Windows 10. So I'm
> tried this command line:
>
> <install cmd='powershell -noninteractive Get-AppxPackage -allusers
> *windowsalarms* | Remove-AppxPackage' />
>
> When I run it manually, in the command line with administrative privileges its
> ok. On Wpkg, it executes with no errors but the Apps are not uninstalled.
>
> Any ideas?
>
> Regards,
>
> Ronnie.
>
> ---------------------------------
> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-***@lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
Stefan Pendl
2018-04-28 07:45:55 UTC
Permalink
Am 25.04.2018 um 15:05 schrieb Ronnie Carlos:
>> I'm trying do run a package that disable some apps from Windows 10. So I'm
>> tried this command line:
>>
>>   <install cmd='powershell -noninteractive Get-AppxPackage -allusers
>> *windowsalarms* | Remove-AppxPackage' />
>>
>> When I run it manually, in the command line with administrative privileges its
>> ok. On Wpkg, it executes with no errors but the Apps are not uninstalled.
>>

Escape the pipe character for the shell:

<install cmd='powershell -noninteractive Get-AppxPackage -allusers
*windowsalarms* ^| Remove-AppxPackage' />

If you can successfully run it in the command prompt, then also use a
command prompt with WPKG.

<install cmd='%ComSpec% /c "powershell -noninteractive Get-AppxPackage
-allusers *windowsalarms* ^| Remove-AppxPackage"' />

If you are running WPKG from a server share you must also allow external
sources, see the -ExecutionPolicy command line switch for powershell.


--
*Stefan P.*

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Andrew Smith
2018-04-25 13:03:17 UTC
Permalink
Hi Ronnie,

>> <install cmd='powershell -noninteractive Get-AppxPackage -allusers
>> *windowsalarms* | Remove-AppxPackage' />

Are you sure that the pipe isn't been interpreted by the underlying
cmd.exe process and is being seen by powershell when called from
within a wpkg package? One alternative might be to put the command in
a powershell script and call that from within your package - eg:

<install cmd='PowerShell.exe -ExecutionPolicy Bypass -File
%software%\remove-windows-alarms.ps1' />

(There might be cleaner ways of achieving this).
I hope that helps,
Andy Smith


On Wed, Apr 25, 2018 at 11:00 AM, <wpkg-users-***@lists.wpkg.org> wrote:
> Send wpkg-users mailing list submissions to
> wpkg-***@lists.wpkg.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
> or, via email, send a message with subject or body 'help' to
> wpkg-users-***@lists.wpkg.org
>
> You can reach the person managing the list at
> wpkg-users-***@lists.wpkg.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of wpkg-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Remove Windows Apps (Mike Burgener)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 25 Apr 2018 06:06:23 +0000
> From: Mike Burgener <***@caritas.ch>
> To: Ronnie Carlos <***@hotmail.com>, "wpkg-***@lists.wpkg.org"
> <wpkg-***@lists.wpkg.org>
> Subject: Re: [wpkg-users] Remove Windows Apps
> Message-ID:
> <***@HOEX-MBX01.securesite.ch>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Ronnie,
>
> IS UAC active? If so, try to disable UAC and retry.
>
> Kind regards
>
> Mike
>
>> -----Urspr?ngliche Nachricht-----
>> Von: wpkg-users [mailto:wpkg-users-***@lists.wpkg.org] Im Auftrag von
>> Ronnie Carlos
>> Gesendet: Donnerstag, 29. M?rz 2018 02:51
>> An: wpkg-***@lists.wpkg.org
>> Betreff: [wpkg-users] Remove Windows Apps
>>
>> Hi,
>>
>> I'm trying do run a package that disable some apps from Windows 10. So I'm
>> tried this command line:
>>
>> ?<install cmd='powershell -noninteractive Get-AppxPackage -allusers
>> *windowsalarms* | Remove-AppxPackage' />
>>
>> When I run it manually, in the command line with administrative privileges its
>> ok. On Wpkg, it executes with no errors but the Apps are not uninstalled.
>>
>> Any ideas?
>>
>> Regards,
>>
>> Ronnie.
>>
>> ---------------------------------
>> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
>> _______________________________________________
>> wpkg-users mailing list
>> wpkg-***@lists.wpkg.org
>> https://lists.wpkg.org/mailman/listinfo/wpkg-users
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> wpkg-users mailing list
> wpkg-***@lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users
>
>
> ------------------------------
>
> End of wpkg-users Digest, Vol 122, Issue 1
> ******************************************
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...