👉 Most of the procedures listed below will require that any program using them must be run with Administrator rights.
REGSTRING$ returns the string data for a specified value name associated with a registry key.
Syntax:RetStr = REGSTRING$(HndlKey AS HKEY, _ SubKey AS STRING, _ ValueName AS STRING) Return Value:
Parameters:
|
CREATEREGSTRING is used to create and update Registry Keys.
Syntax:CREATEREGSTRING(HndlKey AS HKEY, _ SubKey AS STRING, _ ValueName AS STRING, _ DataStr AS STRING) Parameters:
|
DELETEREGKEY is used to delete a Registry Key including all of its values.
Syntax:DELETEREGKEY(HndlKey AS HKEY, SubKey AS STRING) Parameters:
|
MACRO HKLM = HKEY_LOCAL_MACHINE DELETEREGKEY(HKLM, "Software\Bcx-32\Bcx\Settings") CREATEREGSTRING(HKLM, "Software\Bcx-32\Bcx\Settings", "Path", "C:\BCX") PRINT REGSTRING$(HKLM, "Software\Bcx-32\Bcx\Settings", "Path") CREATEREGSTRING(HKLM, "Software\Bcx-32\Bcx\Settings", "Path", "C:\Dev\BCX\bin") PRINT REGSTRING$(HKLM, "Software\Bcx-32\Bcx\Settings", "Path") CREATEREGSTRING(HKLM, "Software\Bcx-32\Bcx\Settings", "Vers", "7.4.7") PRINT REGSTRING$(HKLM, "Software\Bcx-32\Bcx\Settings", "Vers")
REGINT returns the integer value for a specified ValueName associated with a registry key.
Syntax:RetVal = REGINT(HndlKey AS HKEY, _ SubKey AS STRING, _ ValueName AS STRING) Return Value:
Parameters:
|
CREATEREGINT is used to create and update Registry Keys.
Syntax:CREATEREGINT(HndlKey AS HKEY, _ SubKey AS STRING, _ ValueName AS STRING, _ DataInt AS INTEGER) Parameters:
|
MACRO HKLM = HKEY_LOCAL_MACHINE CREATEREGINT(HKLM, "Software\Chevy", "Engine", 350) PRINT REGINT(HKLM, "Software\Chevy", "Engine")
REGEXIST determines whether a registry key or value name exists.
Syntax:RetVal = REGEXIST(HndlKey AS HKEY, _ SubKey AS STRING, _ ValueName AS STRING) Return Value:
|
MACRO HKLM = HKEY_LOCAL_MACHINE PRINT "A zero value means that the key and value name exist." PRINT "A value greater than zero means that the key doesn't exist." PRINT "A value less than zero means that the value name doesn't exist." PRINT PRINT "Status Key: Software\Chevy Value Name: Engine"; REGEXIST(HKLM,"Software\Chevy", "Engine") PRINT PRINT "Creating key." CREATEREGINT(HKLM, "Software\Chevy", "Engine", 350) PRINT "Status Key: Software\Chevy Value Name: Engine"; REGEXIST(HKLM,"Software\Chevy", "Engine") PRINT "Value for Key: Software\Chevy Value Name: Engine"; REGINT(HKLM,"Software\Chevy", "Engine") PRINT PRINT "Changing key. " CREATEREGINT(HKLM, "Software\Chevy", "Engine", 283) PRINT "Status Key: Software\Chevy Value Name: Engine"; REGEXIST(HKLM,"Software\Chevy", "Engine") PRINT "Value for Key: Software\Chevy Value Name: Engine"; REGINT(HKLM,"Software\Chevy", "Engine") PRINT PRINT "Deleting key." DELETEREGKEY(HKLM, "Software\Chevy") PRINT "Status Key: Software\Chevy Value Name: Engine"; REGEXIST(HKLM,"Software\Chevy", "Engine") PAUSE
A zero value means that the key and value name exist. A value greater than zero means that the key doesn't exist. A value less than zero means that the value name doesn't exist. Status Key: Software\Chevy Value Name: Engine 2 Creating key. Status Key: Software\Chevy Value Name: Engine 0 Value for Key: Software\Chevy Value Name: Engine 350 Changing key. Status Key: Software\Chevy Value Name: Engine 0 Value for Key: Software\Chevy Value Name: Engine 283 Deleting key. Status Key: Software\Chevy Value Name: Engine 2