<doc>
  <legacy_id>1244</legacy_id>
  <name>deleteRegistry</name>
  <type>function</type>
  <syntax>
    <example>deleteRegistry(<i>keyPath</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>The System Environment</category>
  </classification>
  <references>
    <function tag="platform">platform Function</function>
    <function tag="queryRegistry">queryRegistry Function</function>
    <function tag="setRegistry">setRegistry Function</function>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </history>
  <platforms>
    <windows/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Removes an entry from the <glossary tag="registry">Windows system registry</glossary>.</summary>
  <examples>
    <example>deleteRegistry("HKEY_CLASSES_ROOT\.txt\")</example>
    <example>if not deleteRegistry(storedKey) then answer "Couldn't delete key."</example>
  </examples>
  <description>
    <p>Use the <b>deleteRegistry</b> <control_st tag="function">function</control_st> to uninstall a <glossary tag="registry">registry</glossary> entry your application has previously installed.</p><p/><p><b>Parameters:</b></p><p>The <i>keyPath</i> <glossary tag="parameter">parameter</glossary> is the <glossary tag="file path">path</glossary> to a <glossary tag="registry">registry</glossary> entry.</p><p/><p><b>Value:</b></p><p>The <b>deleteRegistry</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> true if the entry was successfully deleted, false otherwise.</p><p/><p><b>Comments:</b></p><p>If Windows sends an error message to the application, the error message is returned in the <b>result</b>.</p><p/><p><code/><img src="202651"/> <b>Tip:</b><code/> To delete a subkey, use the <function tag="setRegistry">setRegistry</function> <control_st tag="function">function</control_st> to set the subkey's value to empty.</p><p/><p>On Mac OS and Unix systems, the <b>deleteRegistry</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> "not supported".</p><p/><p><code/><img src="202650"/> <b>Caution!</b><code/> Be careful to use only carefully debugged entries with the <b>deleteRegistry</b> <control_st tag="function">function</control_st>., and be very certain you know all the ramifications of the entry you're removing. Removing entries from the <glossary tag="registry">Windows registry</glossary> can cause the system to behave unexpectedly or stop functioning altogether.</p>
  </description>
</doc>