Hi,
Please use this script procedure to set custom notice on the endpoint.
Note:
- Edit following parameters to customize your notice
caption=r"Error"
message=r"Please renew your subscription to continue"
- Run as system user
caption=r"Error"
message=r"Please renew your subscription to continue"
import os;
import re;
import ctypes
class disable_file_system_redirection:
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
def __enter__(self):
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def __exit__(self, type, value, traceback):
if self.success:
self._revert(self.old_value)
def legalnotice(caption,message):
with disable_file_system_redirection():
wcaption=os.popen(r'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticecaption /t REG_SZ /d "'+caption+'" /f ').read()
print(wcaption);
wtext=os.popen(r'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticetext /t REG_SZ /d "'+message+'" /f ').read()
print(wtext);
legalnotice(caption,message)
20170520-Display-legal-notice-on-logon-screen.json (1.73 KB)
Vicky
3
Hai @hytekcomputers ,
We will analyze your request and let you know once its completed
Thank You
caption=r""
message=r""
import os;
import re;
import ctypes
class disable_file_system_redirection:
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
def enter(self):
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def exit(self, type, value, traceback):
if self.success:
self._revert(self.old_value)
def legalnotice(caption,message):
with disable_file_system_redirection():
wcaption=os.popen(r’reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticecaption /t REG_SZ /d “’+caption+’” /f ‘).read()
print(wcaption);
wtext=os.popen(r’reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v legalnoticetext /t REG_SZ /d "’+message+’" /f ').read()
print(wtext);
legalnotice(caption,message)
Hi @hytekcomputers
Please use this script that can remove this procedure which you request
caption=r""
message=r""
import os;
import re;
import ctypes
class disable_file_system_redirection:
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirect ion
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirecti on
def __enter__(self):
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def __exit__(self, type, value, traceback):
if self.success:
self._revert(self.old_value)
def legalnotice(caption,message):
with disable_file_system_redirection():
wcaption=os.popen(r'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System /v legalnoticecaption /t REG_SZ /d "'+caption+'" /f ').read()
print(wcaption);
wtext=os.popen(r'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System /v legalnoticetext /t REG_SZ /d "'+message+'" /f ').read()
print(wtext);
legalnotice(caption,message)
20180110-remove-legal-notice-on–logscreen.json (1.65 KB)
i run the script as local and system, it did not work. also the download for script does not work.