Posts Tagged ‘windows’

VLC Media Player – adding to Default Programs list in Windows 7

Sunday, June 13th, 2010

Problems getting rid of Windows Media Player as default media player for media file types in Windows 7? So did I. I wanted to go to the “Default Programs”-menu (via Start menu or Control Panel), choose “Set your default programs” and setting up VLC Media Player as the default program for all its supported file types (which counts more than 50). However, at least on my computer, VLC doesn’t show up as a program in the list in the “Set your default programs”-utility:

For adding VLC to the list of programs, so that you easily can choose to set VLC as default for some or all its supported file types, I’ve made a registry fix/patch. If you choose to try this, use it at your own responsibility (and preferably read through it before executing)! I take no responsibility for this whatsoever. And if you have knowledge of the registry and have comments to my fix, please comment! BTW, the fix requires you to having installed VLC at its default location; C:\Program Files\VideoLAN\VLC\vlc.exe.

Download the registry fix here: default_programs_-_register_VLC.reg

For execution, download, and remove the “.txt”-suffix, so that you gain a “.reg”-file. Then double-click this file.

For finishing up, go to Control Panel -> Default Programs -> Set your default programs. Verify that VLC media player shows up in the list of programs. Click it, and choose if you want to make it the default program for supported file types. :-)

For comments about the fix, and about adding programs to the “Set your default programs”-utility in general, please see my blogpost on this topic.

Default Programs in Windows 7 – adding program to list of programs

Sunday, June 13th, 2010

When you want to control which file types an installed program should open/handle in Windows 7 (or Vista), one option is to go to the “Default Programs” via Control Panel or the Start menu, and then choose “Set your default programs”. Some programs, however, don’t show up in this list. This was the case for VLC media player on my PC.

If you want a quick fix for VLC, look at this other post. If you want to read in general about adding programs to the list in “Set your default programs”, read on:

This is probably more a nuisance than a problem, because you can attack the file association from the other side, by opening the settings for each file type one-at-a-time and associate it with the program (right-click file -> open with -> select program). However, this can be really time consuming and frustrating with a media player or any other program with more than 50 file type associations.

Therefore, it would be nice to use the “Set your default programs”-feature, where one can view all file types supported by a program, and associate some or all file types to the program with few clicks.

I’ll soon describe how to add missing programs to this list. First some screenshots to get the picture: ;-)

Screen #1: Open this via Start -> Default Programs, and then click “Set your default programs” as indicated below:

Screen #2: Here is the program list, with VLC media player (or other program) missing:

Screen #3: Here is what we want, and how it looks after our fix:

The fix

This requires some familiarity with the Windows Registry (regedit). And NOTE: I take no responsibility for anything you do or don’t in relation to this fix or anything else on this blog. Be careful in the registry (mistakes can break your operative system), and remember it’s your own responsibility!

First some registry terms. In the regedit-editor: A key is displayed in left pane with a folder icon, a value is an item displayed as a line in right pane, while data is the data contained in the value. A “string value” is a value containing a string as data.

Now some todo-points (for more specifics, see example below):

  • Fire up regedit.exe with Admin-privileges.
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\, and find as a key an equivalent to ProgramName (i.e. VLC) or VendorName\ProgramName (i.e. VideoLAN\VLC) under there.
  • Add a key called ‘Capabilites’ under the ProgramName key.
  • Add these three string values under Capabilities: ApplicationDescription, ApplicationName, ApplicationIcon. For contained data in these values, see example and apply imagination.
  • Now, add a key called ‘FileAssociations’ under Capabilities. Under here, add string values referencing file type keys under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ (see example).
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications, and add a string value called i.e. “VLC media player”, with data set to “Software\ProgramName\Capabilities”. Change ProgramName according to actual program name.

Example

As an example, here is the registry-export of my registry additions when I was finished fixing VLC media player:


[HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC\Capabilites]
"ApplicationDescription"="VLC media player is a free and open source media player and multimedia framework written by the VideoLAN project. The default distribution of VLC includes a large number of free decoding and encoding libraries; this greatly reduces the need for finding/calibrating proprietary plugins."
"ApplicationName"="VLC media player"
"ApplicationIcon"="C:\Program Files\VideoLAN\VLC\vlc.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC\Capabilites\FileAssociations]
".mp3"="VLC.mp3"
".wav"="VLC.wav"
".wma"="VLC.wma"
".avi"="VLC.avi"
".mpg"="VLC.mpg"
(TRUNCATED)

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"VLC media player"="Software\VideoLAN\VLC\Capabilites"

Some comments to the example: Under [HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC\Capabilites\FileAssociations] above: The VLC.* values references keys under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\. For instance, the “VLC.mp3″ references the key HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VLC.mp3, which existed from the installation of VLC media player. Under the key HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VLC.mp3, there exists values that describes how a MP3-file is opened if double-clicked while VLC is the associated program.

For a full example, please see my blogpost about VLC media player.

Installing Emacs Muse on Windows XP

Saturday, March 14th, 2009

This post will deal with the installation of the GNU Emacs editor plus the Emacs Muse authoring/publishing environment running Windows XP.

Download & extract

GNU Emacs

First, obtain the latest precompiled Emacs binaries for Windows. Get it directly from the FTP location here, alternatively follow the link from the Getting Emacs guide. Download the latest zip-version marked bin; emacs-22.3-bin-i386.zip these days.

For the full guide on installing emacs on Windows, consult this guide.

After downloading, extract the Emacs zip-file to a permanent location on your computer, i.e. C:\Program Files\emacs, so that this folder directly contains the folders bin,etc,lisp and so on.

Muse

Second, download the latest Emacs Muse (hereafter only called Muse) zip-file. Get it directly from here, alternatively follow the link from the project’s home page here.

Extract the Muse zip-file to, for instance, C:\Program Files\emacs_muse.

Integration

Now it’s time to make include Muse into your Emacs installation/folder: Copy all contents of C:\Program Files\emacs_muse\lisp\ to C:\Program Files\emacs\lisp\.

The HOME environmental variable

We must now set up the .emacs init file, residing in your HOME directory. But first, we need to make sure you have HOME environmental variable. Check it by clicking Start->Run. Type in %HOME% and click OK. Does it open a folder? If so, notice the path of this folder. This is where we’re putting the .emacs init file. If you instead get an error, you must first set the HOME environmental variable:

Start->Settings->Control Panel->System->Advanced->Environmental Variables. In the upper field (user variables), press New. Name=HOME, Value=(whatever path you choose as your home folder. Make sure it exists!). OK x 2.

Editing the .emacs init file

Now that you have a HOME folder, open it: Start->Run. Type in %HOME% and click OK.

Create and edit a file named _emacs or .emacs, any one is good (.emacs is the original file name as used in Unix environments, but Explorer won’t let you create a file with filename starting with a dot, so therefore it’s easier to use the name _emacs). Put this contents into the file:


(setq load-path (add-to-list 'load-path "C:\Program Files\emacs_muse"))
(require 'muse-mode)
(require 'muse-publish)
(require 'muse-html) ;; and so on

For further contents regarding Muse in this file; see here under the heading “Getting Started”.

Testing

Now, start emacs by running the file: C:\Program Files\emacs\bin\runemacs.exe.

Create a new file with the .muse filename extension, (automatically puts emacs in muse mode) i.e. musetest.muse, and you’re set. Try typing something like (notice space bewtween asterisk and text in headings):


* Heading 1
** Heading 2

Test contents.

----

The end of the beginning.

… and notice that the two first lines (the headings) aquire different font weights. If they do; congratulations on your successful Emacs + Emacs Muse installation! If not, maybe you haven’t got emacs into muse mode. Try doing so by pressing Alt-x, then write muse-mode and hit return.

In the end, try publishing to HTML by hitting Ctrl-c Ctrl-t on the keyboard and follow the instructions in the “status field” in the bottom of the Emacs window.

Diving deeper

For diving deeper into muse, reference the project’s documentation:

References