Math software for Windows

General Tips for
Installing and Using
Windows Software

by Eric Schechter. You may find these instructions particularly useful if (i) you are new to the use of Windows, (ii) you have just acquired a new Windows computer, or (iii) you have just acquired some Windows software from an informal source (e.g., from a download or from the Math Department's CD, as opposed to a shrink-wrapped package). Latest alterations to this page: 21 Feb 2006.


About filetypes

In the Windows operating system, filenames end with a period followed by a few letters (most often 3 letters, though it actually can be any number). Generally the file ending indicates the type of file. For instance, "MYTHESIS.TXT" might be a textfile containing your thesis, while "MYDOG.BMP" might be a bitmap picture of your dog.

They don't have to be -- you can rename your files however you like. You could rename "MYTHESIS.TXT" and "MYDOG.BMP" so that each contains what you'd expect the other to contain. But that will lead to confusion, not only for you, but also for your computer. Your computer expects any file whose name ends in "TXT" to be a textfile, not a picture, and it treats that file accordingly. For instance, if you double-click on that file, you'll open a text editor, not a picture editor.

Following are some of the most common filetypes. Your Windows operating system already knows how to recognize and deal with most (but not quite all) of these. You don't need to memorize this list, but understanding the basic concept will probably be helpful.

First, there are the documents -- i.e., files that you edit, and that contain your content:

In addition to the documents, there are other filetypes. You generally won't be editing any of these files, but it will help you to understand what they are. To avoid confusion, you probably should keep all your documents in one set of folders (such as C:\USERS\MYNAME or C:\MY DOCUMENTS) and keep the other files in some other folders (such as C:\PROGRAM FILES).

Some additional information about filetypes can be found at

 

How Microsoft hid the filetypes and how hackers take advantage of that fact and how you can fix it

Filetypes are very useful information, but that information is initially concealed from you by Microsoft, because Microsoft doesn't want to frighten beginners with an information overload. Their attitude is "don't worry, be happy." You can guess filetypes by looking at the different pictures -- each filetype gets its own icon. But different versions of Windows may use different icons, making it hard for us to discuss the filetypes. We'll all speak the same language more easily if you make your computer show you the filetype extensions.

Open up either "My Computer" or "Windows Explorer", and click on the word "View" that appears at the top of the window. On the resulting menu, click on the bottom item, "Folder Options." (See first picture. If you're using Windows m.e., the instructions are slightly different: click "Tools", then "Folder Options.") On the resulting display, click the second tab, which again says "View". (See picture below.)

The way Microsoft sets things up (in the default Windows setting), the box labeled "Hide file extensions for known file types" initially is checked. I urge you to uncheck it; I think you'll end up understanding your computer better as a result. For instance, two files named "Tex" with different icons may now show the filenames "Tex.TXT" and "Tex.EXE" -- for textfile and executable, respectively; I find that much less confusing.

Microsoft's system of hiding the file extensions has been a key loophole used by some hackers to implant viruses. A hacker might create a virus in a script file (SCR) or a Visual Basic Script file (VBS) , and then name the file "MYTUNE.MP3.SCR" or "MYDOG.BMP.VBS". If you haven't corrected Microsoft's concealing of the filename endings, all you would see is "MYTUNE.MP3" or "MYDOG.BMP". You'd think, "oh, it's just a music file or a bitmap picture file, perfectly harmless", and you might doubleclick on it -- whereupon the deadly script would be launched. (Besides SCR and VBS, hackers may also use EXE, COM, BAT, PIF, and probably a few others that I don't know about yet.)

While we're at it, I also recommend that you check "Display the full path in title bar", so that it will be easier for you to figure out what directory you're looking at.

Eventually, you may also want to check "Show all files" (replacing the default setting of "Do not show hidden or system files") for various reasons -- e.g.,

But be careful. Microsoft initially hid those files from you for a good reason. If you mess up a system file, you may have difficulty getting your computer to work properly.


Double-click and Right-click

The term "double-click" refers to clicking twice on an object, with the left (usual) mouse button, with very little time between the two clicks. (By the way, you can adjust the timing to your own liking -- just go to "Start" "Settings" "Control Panel" "Mouse".) In Windows Explorer, if you double-click on a filename, you get the effect that is the "primary association" with the filetype you've clicked on. For example, if you double-click on a file named "Example.TXT", you'll probably start up the program "Notepad" and load the file "Example.TXT" into it, because (unless you've altered the associations) the default association with the "TXT" ending is Notepad. When you apply the primary association, it is said that you Open the file.

The term "right-click" refers to clicking once on an object, with the right mouse button. This brings up a menu of secondary options -- i.e., the various actions that are associated with that filetype or with all filetypes. For instance, I've configured my computer so that several different options are associated with TEX files. When I right-click on a TEX-file, I get a result like the picture shown below.

(Probably I should remove a few options -- I've added so many things to the list that now it takes me a few seconds to find the one I'm looking for!)

The "Send To" option is particularly interesting. If you click there, it opens up a submenu, which shows all the shortcuts listed in the directory "C:\Windows\SendTo". A few shortcuts, such as "Desktop (create shortcut)", are already there by default -- i.e. as part of the original Windows setup. But you can add whatever shortcuts you like to that folder. (Or delete shortcuts that you're not using -- but I would just move them elsewhere, in case you change your mind later.) In fact, you can even create subfolders, in which you can put more shortcuts. In the picture, you can see that my SendTo directory contains, among other things, a folder that I've created called "Edit text", which contains shortcuts to several of my favorite text editors. Thus, those editors are just a few clicks away if I right-click on any file, regardless of what are the associations for its filetype.

The right-click technique works in places you might not expect. For instance, if you right-click on some blank space in a folder, you'll get a list of actions that can be applied to that folder (see illustration below). One of the options is "New" -- you're being offered the opportunity to create a new file inside that folder. Click there, and you'll get offered a list of filetypes to choose from, for the new file. Note that the first filetype on the list is "Folder"; click there to create a new subfolder inside the folder that you started from.

Still another interesting place to right-click is on the little picture of an open manila folder, displayed in the upper left corner of Windows Explorer. (See illustration below.) This is the place to click if you want to use the Case Rename program, or use the "Command Prompt Here" program which is part of the Powertoys package. Also, if you've installed the program FreeZip, you can click on the word "Zip" on this menu to create a zip file containing the contents of the current directory.

Right-clicking also works in a few programs besides Windows Explorer. In particular, it is important in Netscape (see illustration below). We get many options by right-clicking on a link, or somewhat fewer options by right-clicking on blank space on the web page. By the way, in the last few pictures, the "Create Shortcut" option would make a "LNK" file (for a shortcut to a program or other file), but in the picture below, the two "Create Shortcut" options would make a "URL" file (to a web page, either on the internet or on the hard disk).


Some good places to put shortcuts

A shortcut is a tiny little file, generally less than a half a kilobyte in length. That's next to nothing, by today's storage standards. So you should feel free to make as many additional shortcuts as you like; I can't imagine them adding up to enough space to be noticeable. Put them wherever you find it convenient. You can use them to call up a program from other locations in your computer. You'll find lots of them under "Start" "Programs"; that's the same as "C:\WINDOWS\Start Menu\Programs". But you can copy them to other locations too. (I recommend that you don't alter the "C:\WINDOWS\Start Menu\Programs" directory -- keep those shortcuts just the way the installers put them, for later reference.)

I have observed that most Windows beginners don't make any shortcuts of their own. Their desktops are cluttered with many icons, generally in disarray -- some icons that were already on the desktop when the computer was purchased, and some that were added by the installers of some programs. The desktop also has a background picture that may be pretty or fun but distracts slightly from one's work -- almost like trying to read while the radio is playing. (My children claim that the radio helps them read; I've never understood how that is possible.) On the other hand, the beginner's desktop generally contains no documents; those all end up wherever the editor program decides (by default) to store them. In many cases that is either the "My Documents" directory or whatever directory contains the program doing the editing.

My own arrangement, arrived at by conscious choice after years of experiment and experience, is almost the opposite of the beginner's. On my desktop, I have no shortcuts to programs, but I do keep on the desktop either the documents that I'm currently working on, or shortcuts to the folders containing the documents that I'm currently working on. I also put extra shortcuts to programs in the Start menu and the utility tray. I will describe my own system; perhaps you'll find that some part of it is useful for you as well.

Here's one way to make a shortcut:

  1. Open up two copies of Windows Explorer. In one, you should open (FP) the Folder containing the Program or other object to which you want the shortcut pointing. In the other, you should open (FS) the Folder in which you want to create the Shortcut.
  2. Hold the mouse cursor over the icon or filename of (P) the program to which the shortcut should point.
  3. Press down with the right mouse button; don't let the button back up.
  4. Now, still holding the right mouse button down, move the mouse cursor until it is over (FS) the folder in which you want the shortcut.
  5. Let go of the mouse button. A little menu will appear. One of the options is "Create Shortcut(s) Here". Click on that option with the left mouse button.
Here are some interesting variants on that technique:


Changing your file associations

How do you change the lists that are displayed on a right-click? For instance, how did I get TeXShell to be my primary association for TeX, and get Leo as a secondary association?
New, easy method by adding another program
Use the program OpenExpert.
Old, standard method (built into Windows)
This method is more difficult, and it easily gets messed up by other programs.

Open up either "My Computer" or "Windows Explorer", and click on "Tools". (In some older versions of Windows you need to look under "View" instead of "Tools.") On the resulting menu, click on the bottom item, "Folder Options."

On the resulting display, click on the third tab, "File Types". Now type some letter -- for instance, "T" -- to quickly scroll down to the filetypes that begin with "T". If the filetype you want isn't there, you can add it by clicking on the "New" button and answering the questions that show up.

The "Change..." button changes what is the one program that always comes up with this filetype. But what we want is the "Advanced" button, which brings up the "Edit filetype" dialogue. Pictured below is the "Edit filetype" dialogue for the type TXT (ordinary textfiles), but the same technique works for other filetypes -- TEX, PS, DOC, PDF, or whatever.

You will see displayed all the actions that are already associated with the filetype ".txt". You can change all sorts of things:

For instance, after clicking "New", you could add the Action "NextPad": Type that program name into the "Action" box (or any name you like; this part is what you'll see on the context menus later). Then click "Browse" to find the program that you want in the "Application used to perform action" box.

You'll find something like "C:\Program Files\NextPad\NextPad.exe" in that box. But here is a trick: You may find it useful to modify the contents of that box, so that it says

"C:\Program Files\NextPad\NextPad.exe" "%1"

instead. The %1 gets replaced by the filename that you've right-clicked on, and the quotation marks serve as delimiters to tell the operating system that any blank spaces or other unfamiliar characters encountered, in either the name of the program or the name of the file to which the program is to be applied, are part of the filename, not the end of the filename. I've seen this work sometimes, honest; it can make all the difference between a smooth operation and an error message.

To be safe, you probably should put quotation marks around both the command path and the %1, as I've done in the illustration above. Without the quotation marks, some programs will get tripped up by spaces in the command path or the document path -- e.g., the space between the two words in "Program Files". In cases where the quotation marks aren't needed, they won't hurt. (Microsoft sometimes doesn't automatically put the quotation marks in; I guess that's because Microsoft programs don't need them.)

In a few extreme cases, even the quotation marks won't overcome the problem with spaces, and you may simply need to move your files and programs elsewhere.

The technique with "%1" also makes it easier to start up DOS programs -- i.e., programs which are designed for the Microsoft operating system that preceded Windows. For instance, I have a copy of TtH (TeX to HTML), a program for converting Plain TeX or LaTeX documents into HTML documents. The instructions say to start it at a DOS prompt. However, if you're going to run it in its most basic mode of operation -- i.e., without any command switches -- then the startup command is just "tth filename" where filename is the filename of the input TEX file. In that case, we can automate the procedure, and not bother with a DOS prompt. Just add this action to the filetype TEX:

Now, to start up TtH, just right-click on the filename of the TeX file, and then click on the option TtH. (Of course, if we want to run the program with any of its option switches, then this technique won't work, and we'll still have to resort to a DOS prompt, or else add more actions to our right-click assocations list -- e.g., several modified versions of the TtH command.)

Following are a couple more examples, to finish this topic off. When I right-click on any "tex" file on my computer, one of the options that comes up is "latex". I get that with these settings:

And when I right-click on any "dvi" file, one of the resulting options is "dvipdfm", obtained this way:

 


About downloading and unzipping files

When you download a program from the internet, one of the first things you'll need to know is: Where did my downloaded file go? You might have trouble finding the file. If you've never configured your browser for the download location, then probably the file will end up in the same directory as the browser itself --- for instance, your downloaded file might end up in the directory "C:\Program Files\Mozilla Firefox" if you've been using the Firefox browser.

It's a bit of a bother to have to go looking for your downloads; it's better to tell the program where you want the files. I usually download files onto my desktop --- i.e., into the directory "C:\Documents and Settings\personal\Desktop" --- though I only keep the file there temporarily, since I don't want to get my desktop overly cluttered. Most browsers will give you the opportunity to specify the location, at the time of downloading. Firefox also allows you to, at any time, specify a default download location; just go to "Tools" "Options" "Downloads."

As we mentioned earlier, most downloaded freeware programs are stored in a compressed archive format --- most often as

(To tell what kind of file you've downloaded, you'll need to be able to see those 2- or 3-letter file endings. If you can't see the file endings, you need to unhide the file extensions, explained earlier on this page.) For any compressed file other than a self-extracting one, you will need an archive manager already installed. Probably you already have one. If not, you will discover your lack when you get to the marked (*) step below. You can get a free archive manager from this list.

Before you decompress the file, you'll want to move it to a directory of its own. Indeed, if you decompress it where it is (e.g., on your desktop), the several files contained in it will get mixed in with the several files already on your desktop, and it may take a long time to straighten all of that out. So here are your next few steps:

  1. Create a new, empty folder, wherever you wish, with whatever name you wish. Personally, I find it convenient to create a folder on the desktop, and to name it "TEMP" (to remind myself that it's not supposed to stay there).
  2. Move the compressed file into that subdirectory, so that it is the only file in that folder.
  3. Next, you need to unarchive the file. The procedure depends on the file ending.
  4. If the program hasn't already installed itself by now, you're ready for the next step in the installation process. You now have a folder containing one or more files (and perhaps some subfolders). Look for a file named "SETUP.EXE" or "INSTALL.EXE" or something like that.


Using automatic installers

Automatic installers (if present) usually work quite well, and so I use them. In most cases, the directory containing the installer program should be viewed as a temporary directory. It installs the new program elsewhere (see below). After it's done, you can delete the temporary directory and all its contents -- i.e., you can delete the installer and the directory that it is in.

There is one common malfunction of autoinstallers that I'd watch out for: In most cases, the installation program suggests a "default directory" where it would like to install the files, and then it gives you the opportunity to specify some other directory instead. Usually the default directory is one of these:

I've often been tempted to specify some other directory, because I don't like the filenames that the installation program suggests. But I have learned from experience that it is generally best to accept the "default directory". That is because, in more than a few cases, there is an error in the program, and the program will malfunction -- perhaps not immediately, but after a while -- if you install it in some directory other than the default directory. (My guess is that this occurs because the people who wrote the program didn't test it extensively enough, and they got used to having it installed in their favorite location.)

Save yourself some trouble, and install the program where its authors envisioned it.


Programs that lack installers

What if there is no SETUP.EXE or INSTALL.EXE? In that case, follow this procedure:
  1. Create a new, permanent directory (see remarks below about where to put it).
  2. Move all those files from the installation package (in the TEMP directory) into the program's permanent directory.
  3. One or more of the ".EXE" files in that directory are programs that you'll want to run. Try double-clicking on them to see what happens; then make shortcuts to any that you expect to use. Put the shortcuts in whatever location is convenient for you. (See my earlier discussion about where to put shortcuts.)
  4. You may also need to modify those shortcuts slightly, as explained below.
Now, choosing the permanent location for the program files is a bit tricky. A program that doesn't come with an installation routine is an old-fashioned program, written by an old-fashioned programmer, and some parts of it might not be fully compliant with modern Windows practices. In particular, the program might insist on following pre-1995 filename rules.

The pre-1995 rules were that

any directory or subdirectory name should be at most 8 characters, and most non-alphabetic characters were prohibited. Within a directory, a filename (other than the name of another subdirectory) should be at most 8 characters, followed by a period, followed by at most 3 characters; and again those most nonalphabetic characters are prohibited.
In particular, the directory "C:\Program Files" which is all-important in Windows 95 and later, has a filename that is illegal by pre-1995 rules! In other words, Microsoft has set things up so that the place where most modern Windows programs are installed is not suitable for old Windows programs! I'm not sure why Microsoft did that -- I think they're just begging for trouble. (Or maybe in 1995 they started thinking about ways to make you throw out all your old software and buy new software.)

My remedy is that, when a program is not self-installing, I do NOT put it in "Program Files". Instead, I create a subdirectory called "C:\Moreapps" (note that that's only 8 characters after the slash), and then I create subdirectories under that. For instance, if the program is called "Widget Magic", I would copy its files into a directory named

C:\Moreapps\Widgmagc

(again using only 8 characters after the slash). The executable might have a path like "C:\Moreapps\Widgmagc\widge.exe".


The PATH environmental variable

When your computer is starting up, even before it displays a pretty screen saying "Microsoft Windows", one of the first things it does is to look in several technical configuration files -- among them, These are plain, unformatted textfiles, so if you ever need to edit them, use an unformatted editor such as Notepad -- not a formatted editor like Word or Wordperfect. You can look at these files if you want, but be careful not to change them unless you're sure you know what you're doing -- if you mess them up, your computer won't work right.

For some of our software -- particularly our TeX programs -- we probably will need to make one small change in the "C:\AUTOEXEC.BAT" file. One or more lines in that file are used to set the PATH variable. The PATH variable is an environmental variable that tells programs where to look for files they might need. If a program is looking for a file and doesn't have explicit instructions on where to find that file, it will look in all the places along the PATH. A typical PATH setting in an old Windows 3.1 computer would be something like

PATH=C:;C:\WINDOWS;C:\WINDOWS\COMMAND
which means "if you don't find the file you're looking for, try looking in my C: directory; and if that doesn't work, try looking in my C:\Windows directory, and then try looking in my C:\Windows\Command directory." (In case you're wondering, this stuff is not case-sensitive -- i.e., it doesn't matter whether you use capital letters, lower-case letters, or a mixture of the two.)

Most modern programs supply all the file information they need, so they don't have to bother looking at the PATH variable. But the TeX program is legacy software -- it has been handed down from earlier operating systems, with only moderate alterations. Some of the TeX-related programs will expect your main TeX programs to be located someplace that is on your path. For instance, where your Tex programs are located depends on which version of Miktex you're using; for some versions, the programs are located at

Then you will need to have as part of your PATH. This can be accomplished by adding to your AUTOEXEC.BAT file, a line that says

set PATH=%PATH%;c:\texmf\miktex\bin

The effect of that line is to add the desired string to the end of your PATH variable. -- Miktex 2.0 makes an analogous change automatically for you in your AUTOEXEC.BAT file, but then you need to reboot to make this take effect.

You have to be careful what you put into your PATH variable, for a few reasons: (1) If your PATH is too long, the operating system may take a long time to find what it's looking for. (2) If your PATH includes two or more directories containing files that have the same name, the operating system may sometimes find the wrong file. (3) If your PATH is too long, the operating system will simply ignore the end part of it. (4) Most important, if you put some unacceptable characters into your PATH line, then your PATH will be corrupted, and the operating system won't see the rest of the line. For instance, I once accidentally set my path to something like this:

PATH=C:;C:\WINDOWS;C:\WINDOWS\COMMAND;c:\Program Files;c:\texmf\miktex\bin
And then my TeX programs didn't work right. The problem here is that the PATH variable has to follow the pre-1995 filename rules, but the all-important filename "Program Files" does not follow those rules. My operating system ignored everything after the blank space in the middle of "Program Files", and so it couldn't find my TeX programs! This was easy to fix, after I figured out what was causing the problem.


Scheduled events

The Task Scheduler can be seen as an icon in the system tray, usually kept in the lower right corner of the Windows screen -- it looks like a calendar, a day planner book, and a clock. If you double click on it, you'll bring up the Task Scheduler program, which can be used to schedule various tasks.

For instance, our department's Windows computers (the ones in the computer room) generally are left running 24 hours a day, but any Windows computer should be rebooted at least once a day (to avoid excessive loss of allocatable RAM and other corruption problems that are common in the Windows operating system). So I've scheduled our department's computers to reboot themselves each day at 1:45 AM. This can be done using the command

C:\WINDOWS\RUNDLL32.EXE shell32.dll,SHExitWindowsEx 2

which reboots the computer. Schedule that command for every 1:45 AM and the rebooting will take care of itself. Similarly, you might set the computer to run Scandisk once a month, to check for and correct physical errors on the hard disk.

In a similar fashion, I also set up the computers to update the antivirus definition files once a week, and to scan the entire hard disk for viruses once a month. However, I don't use the Windows scheduler for those tasks -- our university uses McAfee Antivirus, which has its own scheduling system.