- package: tis-enable-srp-win11
- name: Enable SRP Windows 11 22H2 or higher
- version: 2-0
- categories: Security
- maintainer: WAPT Team,Tranquil IT,Bertrand LEMOIGNE,Yohannès ALEMU
- target_os: windows
- architecture: all
- signature_date:
- size: 5.12 Ko
package : tis-enable-srp-win11
version : 2-0
architecture : all
section : base
priority : optional
name : Enable SRP Windows 11 22H2 or higher
categories : Security
maintainer : WAPT Team,Tranquil IT,Bertrand LEMOIGNE,Yohannès ALEMU
description : Enable SRP on Windows 11 22H2 or higher
depends :
conflicts :
maturity : PROD
locale :
target_os : windows
min_wapt_version : 2.1
sources :
installed_size :
impacted_process :
description_fr :
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor :
keywords :
licence :
homepage :
package_uuid : 63fd56dc-eccd-44e6-9912-9ad11db72f88
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : 9420721210f5d9c50c9e35c9fdbf0a088b30e165df8311c5f2176ce60e122475
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2025-04-30T16:14:14.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature : rivOI28U0ZtlTpAmRe62noe2Z77R/67GzbJ/+CeOLvq3Z6fGckKmfVLfc5FKVAjWdRkvIKBf6lDUj9XPUxhebc2xuxgKBi7dtECloIIQzG/g0O64+COl3rep+Dgt3nVV+zvB8j/B1cA0t+unJp+jmJm0sX3wWPXFwtvtALfzy0NtwbUt+Ud+bRyWkuG3C8p4XNT7TGLUVTn8I8tEBdG0YILx59Tb5Ts3iyaxdG0WNXGpETaP8klSPL3OD3Y3JLpJzSziGFXExP/iQXGy0LNA3J4bO7MwVytcNAhpVXPq6v4oqzjW8lWbRCyDrDXykltVPj3sfbFP+/PwRgMFxTo+lA==
# -*- coding: utf-8 -*-
from setuphelpers import *
def install():
#re-enables SRP on Windows 11 22H2 and later
print('Enabling SRP')
registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','RuleCount',0,type=REG_DWORD)
if reg_value_exists(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','LastWriteTime'):
registry_delete(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','LastWriteTime')
else:
print("Key HKLM\SYSTEM\CurrentControlSet\Control\Srp\Gp\LastWriteTime Seems to be already deleted. SKIP.")
def uninstall():
#disables SRP
print('Disabling SRP')
registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','RuleCount',2,type=REG_DWORD)
#We can uncomment the following line when REG_QWORD is added to setuphelpers
#registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','LastWriteTime',1,type=REG_QWORD)
def audit():
if registry_readstring(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','RuleCount') == '0' or reg_value_exists(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Control\Srp\Gp','RuleCount') is False:
print("Software Restriction Policies are enabled")
return "OK"
else:
print("Software Restriction Policies are not enabled anymore")
return "ERROR"
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1601dacb50c0536cd6bedb8011fb70cd63286d56d726d9063cfb9d89af4f11e1 : WAPT/control
9420721210f5d9c50c9e35c9fdbf0a088b30e165df8311c5f2176ce60e122475 : WAPT/icon.png
32f30418494ce1901eaf210ac247c8226b42d81885c73bea599d1a8837892268 : luti.json
00fb406e77ec659b1e6ffa1d4b6ea69afff4333693f869ec3c1db8e4c608ee27 : setup.py