diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:23:38 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-27 14:23:38 (GMT) |
commit | 45beb64f7dcb09a6ce83532702bca760f72e6f4d (patch) | |
tree | f7746a2a8316d612570e1456524e3d182e855c82 /doc/registry.n | |
parent | 5bc57d7b0f63d86fc383565d69f7704943fff94d (diff) | |
download | tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.zip tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.tar.gz tcl-45beb64f7dcb09a6ce83532702bca760f72e6f4d.tar.bz2 |
Yet more doc update backporting
Diffstat (limited to 'doc/registry.n')
-rw-r--r-- | doc/registry.n | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/registry.n b/doc/registry.n index e6a4902..549a2e1 100644 --- a/doc/registry.n +++ b/doc/registry.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: registry.n,v 1.8 2002/10/19 01:48:46 hobbs Exp $ +'\" RCS: @(#) $Id: registry.n,v 1.8.2.1 2004/10/27 14:23:58 dkf Exp $ '\" .so man.macros .TH registry n 1.1 registry "Tcl Bundled Packages" @@ -60,7 +60,7 @@ keys like Environment. The timeout specifies the amount of time, in milliseconds, to wait for applications to respond to the broadcast message. It defaults to 3000. The following example demonstrates how to add a path to the global Environment and notify applications of the change without -reguiring a logoff/logon step (assumes admin privileges): +requiring a logoff/logon step (assumes admin privileges): .CS set regPath {HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment} set curPath [registry get $regPath "Path"] @@ -179,9 +179,24 @@ In addition to the symbolically named types listed above, unknown types are identified using a 32-bit integer that corresponds to the type code returned by the system interfaces. In this case, the data is represented exactly in Tcl, including any embedded nulls. - .SH "PORTABILITY ISSUES" The registry command is only available on Windows. +.SH EXAMPLE +Print out how double-clicking on a Tcl script file will invoke a Tcl +interpreter: +.CS +package require registry +set ext .tcl + +# Read the type name +set type [\fBregistry get\fR HKEY_CLASSES_ROOT\e\e$ext {}] +# Work out where to look for the command +set path HKEY_CLASSES_ROOT\e\e$type\e\eShell\e\eOpen\e\ecommand +# Read the command! +set command [\fBregistry get\fR $path {}] + +puts "$ext opens with $command" +.CE .SH KEYWORDS registry |