I have a TCL/TK app on Windows. What is the best way to open a file with its associated program? For example, I am generating a PDF, and I want it to open automatically.
There's an example to see what the association is on the registry man page
package require registry
set ext .tcl
# Read the type name
set type [registry get HKEY_CLASSES_ROOT\\$ext {}]
# Work out where to look for the command
set path HKEY_CLASSES_ROOT\\$type\\Shell\\Open\\command
# Read the command!
set command [registry get $path {}]
puts "$ext opens with $command"