deleteRegistry

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
deleteRegistry(<keyPath>)
Summary

Removes an entry from the Windows system registry.

Introduced2.0
OSwindows
Platformsdesktop, server
Parameters
NameTypeDescription
keyPath

The keyPath parameter is the path to a registry entry.

Example
deleteRegistry("HKEY_CLASSES_ROOT\.txt\")
if not deleteRegistry(storedKey) then answer "Couldn't delete key."
Values
NameTypeDescription
return

The deleteRegistry function returns true if the entry was successfully deleted, false otherwise.

The result

If Windows sends an error message to the application, the error message is returned in the result.

RelatedControl Structure: function
Glossary: registry, return
Function: setRegistry, queryRegistry, platform
Description

Use the deleteRegistry function to uninstall a registry entry your application has previously installed.

Tip: To delete a subkey, use the setRegistry function to set the subkey's value to empty.

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

Warning: Be careful to use only carefully debugged entries with the deleteRegistry function., and be very certain you know all the ramifications of the entry you're removing. Removing entries from the Windows registry can cause the system to behave unexpectedly or stop functioning altogether.