Title = "Welcome In Example Company Pvt Ltd" ##give here the title

Message = "Do not touch without permission .....!!!!!" ##give here the message


import os
import _winreg
from _winreg import *

Sub_Key= "legalnoticecaption"
Sub_Key1= "legalnoticetext"
Field= _winreg.REG_SZ

try:
    Key=r"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
    if not os.path.exists(Key):
        key = _winreg.CreateKey(HKEY_LOCAL_MACHINE,Key)
    Registrykey= OpenKey(HKEY_LOCAL_MACHINE,Key, 0,KEY_WRITE)
    _winreg.SetValueEx(Registrykey,Sub_Key,0,Field,Title)
    CloseKey(Registrykey)
    Registrykey= OpenKey(HKEY_LOCAL_MACHINE,Key, 0,KEY_WRITE)
    _winreg.SetValueEx(Registrykey,Sub_Key1,0,Field,Message)
    CloseKey(Registrykey)
    print("Successfully set up login screen banner")
except WindowsError:
    print("Error")