Setting the HOME Variable

If you do want to install your emacs directory somewhere other than in c:\emacs, you need to set the home variable and put your _emacs file where this home variable specifies.

The easiest way to do it, is by adding or modifying a line in autoexec.bat. You can get to autoexec.bat most easily by choosing the Run command from the start menu and entering "sysedit" in the Run dialog. This will run the system editor, which is just a glorified notepad, autoexec.bat is one of the files it opens. Change or add a line so that it has this line in it:

SET HOME = C:/myhomedirectory

Where "C:/myhomedirectory" is the directory where you want to put your startup _emacs file. You could of course just make this the root directory on the C drive, or you can pop it on a network drive or another hard drive.

NOTE the / slash.... NOT the \ slash... emacs reads UNIX-style paths... NOT DOS ones!!

Now reboot... windows won't recognise environment variables unless they were set at boot-up.

The other way to do it is to open regedit... i.e. choose the run command from the start menu and enter "regedit" in the box. Navigate your way to HKEY_USERS/.DEFAULT/SOFTWARE... add a key called "Emacs", then add a string value called "HOME" with the value set to the directory that your _emacs file is in. You shouldn't need to reboot to do this. MAKE SURE YOU USE THE / SLASH IN THE PATH THOUGH!!