Computing Tips
for
Windows Computers


back to main page

Table of Contents



Topics

Create a friendly Windows working environment to run commandline-typed analytical programs

There are many analytical programs running in Linux or UNIX systems and they are also found a Windows version. For example, the popular GWAS program, PLINK, is mostly run in LINUX but it has the Windows or DOS version. This can be very convenient for people who either wants to have some tests on ideas while s/he is working/reading on her/his Windows environment, e.g. working on a laptop on road. A quick run of PLINK may make a difference. There are many similar Windows-based programs, such as those developed by Department of Biostatistics for sample size/power calculation, clinical trial design, etc., of all which you may have or will download to work in your Windows environment.

It'll be an ideal setting if you can download the program and save it in a central place (folder) and invoke it anywhere your working folder is created. Here is the tip just to help you to create this kind of setting it will benefit your work.

You may do the following steps:

  1. Create a folder called "bin" (a short form for binary) directly under C: drive, i.e. create "c:\bin\";
  2. Make it accessible anywhere in the Windows by setting up its system path using this method (see below);
  3. Download the plink.exe (or your program) and save it in "c:\bin\plink.exe";
  4. Test it by going to another folder, e.g. "D:\working\test\";
  5. Launch the command prompt window (in old days, it is called DOS window) by go to Windows Start -> Search Box and type "cmd";
  6. At the commandline, type "cd /d D:\working\test\" to go to this testing folder, and then simply type "plink", or "plink --help". If your path setting was correct, you should have seen plink running now. Otherwise, either your path setting has not taken effect yet (the computer takes time to realize this just set path or you may restart your computer to make the newly set path being seen), or you have to go back to Step 2 to go through path setting again.
    Friendly Reminder Once you create such a "c:\bin" serving as a central depository of your analytical software, you may find this is a convenient tool library because if you also happen to be programming some scripts, this library can be a power house to enhance your scripts to call different programs at great flexibility. Besides this, you may find the back up this central depositary can't be simpler and easier: just copy the entire "c:\bin" to your safe place and once you acquire a new Windows system, then simply copy it back and set the path, and you're ready to enjoy it.

Windows Path Setting

First step, to open System Properties dialog by going to Start and in the Windows Search Box, type "sysdm.cpl" and press Enter.

Second step, following the red arrowed route in the following picture to go to the path editing part:
  1. Upon "System Properties" dialog open, go to "Advanced" tab, and click on "Environment Variables";
  2. In the following "Environment Variables" dialog box, go to "System variables" section, and click on "Path", then click "Edit" button;
  3. At this point, you should be able to see "Edit System Variable" dialog box, go to "Variable value" window, and type the end of the string, type "; c:\bin". Make sure you type semicolon ";" before "c:\bin";
  4. Then follow the blue-arrowed route, i.e. click on a series of "OK" buttons to complete the process.



Basically you are done with the path setting. But unless you immediately restart your computer to make this setting in effect. Otherwise you may have to wait a moment or so to let the operating system to start picking up this change. New Windows such as Windows 7 or later usually works this way without restarting computer but old ones, e.g. Windows XP or before, may have to ask you to restart it.


Contact for web content questions: Robert Yu via rkyu@mdanderson.org