MsShellExecute

On Microsoft Windows, files are typically associated with applications according to their file extension. There are various ways to exploit this functionality in Emacs, to open *.doc files in Word, URLs in a Web browser, and so on.

        (defun dired-custom-execute-file (&optional arg)
          (interactive "P")
          (mapcar #'(lambda (file)
		      (w32-shell-execute "open" (convert-standard-filename file)))
	          (dired-get-marked-files nil arg)))

        (defun dired-custom-dired-mode-hook ()
          (define-key dired-mode-map "X" 'dired-custom-execute-file))
        (add-hook 'dired-mode-hook 'dired-custom-dired-mode-hook))

CategoryWThirtyTwo CategoryExternalUtilities WThirtyTwoShellExecute