Error getting tags :
error 404Error getting tags :
error 404 setRegistry | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
setRegistry
Basics
Expander triangle
Type
Function
Syntax
setRegistry(keyPath,value[,type])
Introduced
1.0
Changed
2.0
Environment
Desktop, Web and Server
Platform Support
Windows
Security
None required
Summary
Sets an entry in the Windows system registry.
Examples

setRegistry("HKEY_CLASSES_ROOT\.txt\", "NotePad")
if setRegistry(myEntry & "/",myValue) then open file myFile
setRegistry(theKey,empty)

Additional Comments
Expander triangle

Use the setRegistry function to change the behavior of Windows.

Parameters:

The keyPath parameter is the path to a registry entry.

The value is the new setting for the entry specified by the keyPath.

The type is one of the following: "binary", "dword", "dwordlittleendian", "dwordbigendian", "expandsz", "link", "multisz", "none", "resourcelist", "string", or "sz". If you don't specify a type, "string" is used.

Value:

The setRegistry function returns true if the setting was successfully changed, false otherwise.

Comments:

The first part of the keyPath should be one of the predefined handle values. If the keyPath ends in "\", the new setting becomes the default value. For example, if you want files ending in ".rev" to automatically launch Revolution, use the following command:

get setRegistry("HKEY_CLASSES_ROOT\.rev\", "Revolution")

If the key doesn't exist, the setRegistry function creates it in the registry.

To delete a subkey, set the subkey's value to empty.

If the type is a binary type, make sure the value is binary. (You can encode a string as binary data using the binaryEncode function.)

If Windows sends an error message to the application, the result function returns the error message.

On Mac OS and Unix systems, the setRegistry function returns "not supported".

Caution! Be careful to use only carefully debugged entries with the setRegistryfunction. Changing entries in the Windows registry to invalid values can cause the system to behave unexpectedly or stop functioning altogether.

Changes to Revolution:

The type parameter was added in version 2.0. In previous versions, the type information could not be set.

User Comments
Expander triangle