#To define a particular parameter, replace the 'parameterName' inside itsm.getParameter('parameterName') with that parameter's name
import _winreg
Key= r"SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" ## Here give the registry Key path. STRING
Sub_Key= "SecureProtocols" ## Here give the sub Key of the registry. STRING
Field= _winreg.REG_DWORD ##Here give the field of it
value = 2048 ##Mention the value 

import os
from _winreg import *
try:
    Key=r"SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"    
    if not os.path.exists(Key):
        key = _winreg.CreateKey(HKEY_CURRENT_USER,Key)
    Registrykey= OpenKey(HKEY_CURRENT_USER,Key, 0,KEY_WRITE)

    _winreg.SetValueEx(Registrykey,Sub_Key,0,Field,value)
    CloseKey(Registrykey)
    
    print "Successfully disabled TLS 1.0/1.1"
    Key=r"SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"    
    if not os.path.exists(Key):
        key = _winreg.CreateKey(HKEY_CURRENT_USER,Key)
    Registrykey= OpenKey(HKEY_CURRENT_USER,Key, 0,KEY_WRITE)

    _winreg.SetValueEx(Registrykey,Sub_Key,0,Field,value)
    CloseKey(Registrykey)
    print "Successfully enabled TLS 1.2"
except WindowsError:
    print "Error"
