I need a script to create Registry Keys. I’ve tried the script located here: https://scripts.comodo.com/frontend/web/topic/set-registry-value …but it hasn’t worked at all.
Hello @rawtech
Indeed the script you posted will not work for what you want to achieve as that will only modify an existing registry key value. While waiting for one of the script developers to reply here, you can opt to use the ‘Run a Batch file’ script.
Create a batch file for testing and once you are satisfied it does what you intend it to do, copy the contents of the BAT file into the ‘Run a Batch file’ script. In the script…
BAT=r'''
ipconfig
'''
Replace the ‘ipconfig’ line with the necessary BAT commands (REG ADD …).
Hello @rawtech
We will take a look on it. Will modify the script and supply the link here.
Thank you.
Hi @rawtech
Please refer the attached JSON file for setting up the registry on your endpoint,
Note:
Run as System User
Edit Parameters:
##Format can be given as DWORD, QWORD, SZ, EXPAND, MULTI, BINARY
DWORD - It consists of values such as ‘1’ or ‘0’
QWORD - It should have value in integer format
SZ - It can have string values as well as integer format
EXPAND - It can have string values as well as integer format
MULTI - It can have string values as well as integer format
BINARY - It should have value in integer format
word_format=‘DWORD’ #Provide the value as in Format
Key= r"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" ## Here give the registry Key path
Field=r"NoAutoRebootWithLoggedOnUsers" ##Here give the field of it
value=‘1’ ##Provide the value for the field
Let us know your feedback to us,
Thank you.
20180802-Registry_Creation_Endpoint.json (4.64 KB)