Page 1 of 1

Uninstall Windows Mail once the Creators Update is installed

Published: October 3, 2017 - 11:58 PM
by f4242
Hello,

Windows 10 version 1607 is currently in production on our machines. I'm testing the update to Windows 10 version 1704 and I've noticed that Microsoft is forcing Windows Mail down our throats by pinning it to the taskbar. Thanks, Microsoft!

I was thinking of creating a package similar to tis-disable-cortana to uninstall Windows Mail from the PCs.

How can I make the uninstallation happen only after the PC has been upgraded to version 1704?

Thank you.

Re: Uninstalling Windows Mail

Published: October 5, 2017 - 8:49 PM
by f4242
I'm trying to use the min_os_version of the package control file to achieve what I described. I think I've found a bug related to this feature.

To see what kind of version number it returns, I looked at the wapt source code and found that it uses setuphelpers.windows_version() and that this method uses platform.win32_ver().

The problem is that it doesn't seem to support Windows 10. On a Windows 10 PC, ` platform.win32_ver()` incorrectly returns a value corresponding to Windows 8:
('8', '6.2.9200', '', 'Multiprocessor Free').

Apparently, platform.win32_ver()` uses an API that is no longer supported by Microsoft:
https://stackoverflow.com/questions/325 ... windows-10

EDIT: This is supposed to be fixed in Python >= 2.7.11, but even though `waptpython.exe --version` returns Python 2.7.13 , it doesn't work.
https://stackoverflow.com/questions/334 ... windows-10

Re: Uninstalling Windows Mail

Published: October 6, 2017 - 8:28 PM
by dcardon
Hello f4242,

it's best to start a new thread for a new topic. But anyway, since I took a look at how it works on my machine... In wapt-1.3.13 and wapt-1.5 (which should be released in a few weeks), it works correctly. Which version are you using?

C:\Users\dcardon>waptpython
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.win32_ver()
('10', '10.0.15063', '', u'Multiprocessor Free')
>>>

Re: Uninstalling Windows Mail

Published: October 6, 2017 - 9:11 PM
by f4242
Hi,

Here's my version:

C:\wapt>wapt-get --version
Wrapper Win32.exe : wapt-get 1.3.13.0
wapt-get.py 1.3.13.0 common.py 1.3.13.0 setuphelpers.py 1.3.13.0

Hmm, I did the same thing as you with the interactive waptpython and it does indeed work. The erroneous result I got was with pyscripter.

Re: Uninstalling Windows Mail

Published: October 10, 2017 - 10:36 PM
by f4242
Okay, I found it. I needed to import the new version of tis-python27. setuphelpers.windows_version() now returns 10.0.14393 on a Windows 10 PC (Anniversary Update) when launched from pyscripter.

But I still have a problem ;)

I add this line to my file control:

Code: Select all

min_os_version    : 10.0.15063
I build my package... and poof, the line disappears! My package then installs regardless of the Windows version used. Any idea what's wrong?

Re: Uninstalling Windows Mail after the Creators Update is installed

Published: October 11, 2017 - 6:05 PM
by dcardon
PyScripter runs with the locally installed Python in c:\python27 (the default installation directory). So yes, it needs to be kept up to date.

The min_os_version attribute is not supported in WAPT 1.3. You have to wait for version 1.5.

Re: Uninstalling Windows Mail after the Creators Update is installed

Published: October 11, 2017 - 8:53 PM
by f4242
Okay. The documentation needs to be corrected; it states that this has been available since version 1.3.9: https://www.wapt.fr/fr/doc/CreationPaqu ... index.html.

Thank you!

Re: Uninstalling Windows Mail after the Creators Update is installed

Published: October 27, 2017 - 3:57 PM
by f4242
While waiting for version 1.5, I thought about adding a condition to my installation script to verify that Windows is indeed version 1703 before proceeding. I know how to check the current Windows version, but I was wondering how to make the package attempt to reinstall itself until Windows is updated?

I imagine I need to force the package to fail? How?

Thanks!

Re: Uninstalling Windows Mail after the Creators Update is installed

Published: October 27, 2017 - 4:55 PM
by sfonteneau
With error

Example :

Code: Select all

error('Je suis une erreur')

Re: Uninstalling Windows Mail after the Creators Update is installed

Published: October 27, 2017 - 7:38 PM
by f4242
Excellent, thank you!