Page 1 of 1

Windows 10: Disabling features

Published: July 18, 2016 - 5:43 PM
by the Challans Town Hall
Hello,

here are some registry keys attached:

Registry keys included:

- disable AD Customization
- disable Cloud
- disable Data Collector
- disable Drive Encryption
- disable Windows Error Reporting
- disable Messenger
- disable OneDrive
- disable Store
- disable Windows Search
- disable Windows Update Shares

Python code (the package filters so they only apply to Windows 10):

def install():
# if you want to modify the keys depending on environment (win32/win64... params..)
global uninstallkey
global uninstallstring

print('Installing chal-config-pc')
import wmi
c = wmi.WMI()
for os in c.Win32_OperatingSystem():
name_os=os.Caption
print "SE="+name_os[:20]
if name_os[:20]=='Microsoft Windows 10':
print('-------------------------------')
print('CONFIGURATIONS FOR WINDOWS 10')
print('-------------------------------')
print('Applying registry key windows-10_desactiver_ad-cust.reg')
run(r'regedit.exe /s windows-10_desactiver_ad-cust.reg')
print('Applying registry key windows-10_desactiver_cloud.reg')
run(r'regedit.exe /s windows-10_desactiver_cloud.reg')
print('Applying registry key registry key windows-10_desactiver_data-collect.reg')
run(r'regedit.exe /s windows-10_desactiver_data-collect.reg')
print('Applying the registry key windows-10_desactiver_encrypt-drives.reg')
run(r'regedit.exe /s windows-10_desactiver_encrypt-drives.reg')
print('Applying the registry key windows-10_desactivate_error-reports.reg')
run(r'regedit.exe /s windows-10_desactiver_error-reportst.reg')
print('Applying registry key windows-10_desactiver_messenger.reg')
run(r'regedit.exe /s windows-10_desactiver_messenger.reg')
print('Applying registry key windows-10_desactiver_onedrive.reg')
run(r'regedit.exe /s windows-10_desactiver_onedrive.reg')
print('Applying the registry key windows-10_desactiver_store.reg')
run(r'regedit.exe /s windows-10_desactiver_store.reg')
print('Applying the registry key windows-10_desactiver_windows-search.reg')
run(r'regedit.exe /s windows-10_desactiver_windows-search.reg')
print('Applying registry key windows-10_desactiver_winupdate-share.reg')
run(r'regedit.exe /s windows-10_desactiver_winupdate-share.reg')

Re: Windows 10: Disabling features

Published: July 20, 2016 - 2:10 PM
by olpavil
Unfortunately, this isn't enough for OneDrive. You also need to create a script like this:
@echo off
REM Removing Microsoft Onedrive
REM If OneDriveSetup.exe does not exist, go to :sight
If not exist %SystemRoot%\SysWOW64\OneDriveSetup.exe goto :eof

REM So let's uninstall %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
%SystemRoot%\Windows\SysWOW64\regedit.exe /s \\Corellia\lup\remove_onedrive_icon.reg
:sight
:eof

Re: Windows 10: Disabling features

Published: September 20, 2016 - 09:22
by jmeyer
Good morning,
For my part, I use these scripts: https://github.com/W4RH4WK/Debloat-Windows-10 for apps and OneDrive.
I have not yet tested integrating them into a wapt package because you have to run the "Set-ExecutionPolicy Unrestricted" command in an administrator PowerShell window to allow them to execute it.
I'll try to watch it this weekend.

EDIT
I'm here but I'm having trouble finding the script's address:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import subprocess

uninstallkey = []

def install():
    print('installing Debloat Windows 10')
	subprocess.call(["C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe",
		"-ExecutionPolicy",
		"Unrestricted",
		"Debloat-Windows-10-master\scripts\remove-default-apps.ps1"])
	subprocess.call(["C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe",
		"-ExecutionPolicy",
		"Unrestricted",
		"\Debloat-Windows-10-master\scripts\remove-onedrive.ps1"])
EDIT 2
I've reworked the code. All that's left is to test it, but I lack testing equipment at the site I'm at today...

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import subprocess, os

dir_path = os.path.dirname(os.path.realpath(__file__))

uninstallkey = []

def install():
	print('installing Debloat Windows 10')
	subprocess.call(["powershell.exe","-ExecutionPolicy","Unrestricted",dir_path + "\\Debloat-Windows-10-master\\scripts\\remove-default-apps.ps1"])
	subprocess.call(["powershell.exe","-ExecutionPolicy","Unrestricted",dir_path + "\\Debloat-Windows-10-master\\scripts\\remove-onedrive.ps1"])

Re: Windows 10: Disabling features

Published: September 20, 2016 - 10:42 AM
by jmeyer
Here is the WAPT package.
Test it before deployment! :? :mrgreen:

Re: Windows 10: Disabling features

Published: January 20, 2017 - 4:57 PM
by f4242
Hi,

the forum isn't allowing me to download or view the attachment. Any ideas?

Picture