WriteRegistry

Top  Previous  Next

 

WriteRegistry

 

Syntax

WriteRegistry([in] RootFolderType, [in] KeyFolder, [in] KeyName, [in] KeyVar);

 

Description

To write a string into a registry.

 

Parameters

       RootFolderType

               The root registry folder to write into. There are 5 possible values:

                       "HKLM" = Writing into a root folder HKEY_LOCAL_MACHINE

                       "HKCU" = Writing into a root folder HKEY_CURRENT_USER

                       "HKCC" = Writing into a root folder HKEY_CURRENT_CONFIG

                       "HKCR" = Writing into a root folder HKEY_CLASSES_ROOT

                       "HKUS" = Writing into a root folder HKEY_USERS

       KeyFolder

               The path to the key folder to write into                

       KeyName

               They registry key name to write into

       KeyVar

               The string value to be written.

 

Return

       1 = success

       0 = failed

       -1 = FSCommands cannot be found

 

Example

 

FSCommand("WriteRegistry", "HKLM,Software\\IncrediTools,InstallPath,C:\\test");

 

This will write a registry key value "c:\test" into HKEY_LOCAL_MACHINE\Software\IncrediTools\InstallPath.