You are on page 1of 2

February Tutor

Modifying Directory Defaults G

MODIFY
YOUR DEFAuLTS
Windows has default directories for placing documents and applications: c:\Program Files and c:\My Documents. While this makes sense if youre using only one drive, it can cause problems if youve divided your hard drive into several parts. In this guide we detail how you can change the default directories for both applications and downloaded files.
eft to its own devices, on the type of filewhich drive M i c rosoft Wi n d o w s to look on. This can speed up 98 automatically uses the search, whether youre usC : \ P rogram Files as ing the Start | Find command the default directory for inor searching manually. This s talling new p rograms an d kind of organisation also makes C:\My Documents as the deit easier to back up your files fault for data. If youve opted since you can, for example, to have a single logical drive easily back up just your data on your hard disk, these defiles by backing up the one faults may well be reasonable. data drive. Putting all your programs in Whatever the merits of dividthe Program Files dire c t o r y ing your hard disk into logical keeps them all in one place drives, Windows will still deand in a hierarchical structure, fault to putting programs on and youll always know where drive C:. Most installation ro uthey are. Similarly, the My Doctines let you change the destiuments directory keeps all of nation drive for the installayour data in one placethough tion, but having to make the you should create a hierarc h ichange every time you install a cal structure of directories unp r o gr am i s an un nec ess ar y der My Documents to help you c h o re. locate particular files. UnforThe problem is similar with tunately, these defaults can CHANGING DEFAULTS: The Data folder is now the root directory on drive D:, C:\My Documents, assuming which is named Data. also create problems. you want to put your data on For ex ample, you may a diff e rent drive or even use a choose to create multiple logical drives You could put Windows and other sys- m o re professional sounding dire c t o r y to better organise your hard disk. The dif- t e m - related files (anti-virus pro g r a m s , name, such as Data. For network adf e rent drives can serve the same pur- file utilities and the like) on drive C:, data ministrators, the Windows pre f e re n c e pose as dividers in a file drawerto let on drive D:, and application programs on for C:\My Documents can be more than you separate your files into meaningful drive E:. That way, when youre looking annoying. Its not unusual to want users categories. for a file, you know immediatelybased to store their data on a network hard disk,

86

February 2000

www.DITnet .co.ae

www.pcmag -mideast.com

Tutor February
G Modifying Directory Defaults

which ensures that the data will be backed up on schedule when the network is backed up. And for data files that more than one user needs to modify, this also e n s u res that there wont be diff e re n t versions of the file on various local hard disks, each with a diff e rent set of modifications. Whatever your reason for wanting to use some other name for your first level data directory, the Windows preference for C:\My Documents means youll have to go through the inconvenience of telling Windows programs to go to a diff e re n t first level directory than they will use by defaultevery time you want to save. Also, if you keep your data in a non-default directory, then the My Documents icon on the Desktop and in Windows Exp l o rer will not actually take you to your data. And it means that even if you delete or re-name the My Documents dire c t ory, some programs will occasionally re c reate the directory for you if you dont keep a careful eye out for where those p rograms try to save your data files. The good news is that its not diff i c u l t to modify Windows and change the names, locations or both of the default d i rectories for programs and data. The p ro c e d u re involves modifying the Registry, which means it comes with the usual warnings: you need to be care f u l not to change anything you dont mean to change, because in the worst case, you can make your system unusable. If that happens, youll need to re-install Wi ndows and all your programs. But if youre comfortable with modifying the Registry, the actual pro c e d u re is straightf o r w a rd. You can change either of the default directories or you can change both. For this example, well assume that you want to change both. To change only one, just ignore the directions for changing the other. Well also assume you want to change the default data directory to D: and the default program directory to E:. If youd r ather u se a diff e rent drive or sub d i rectory, simply substitute the drive and pathname in the example. T h e res one other important assumptionthat you are starting with the Windows defaults for program and data directories. If youve done anything to change this in Windows itself (as opposed to setting default directories for particular programs), youll need to return to the defaults or modify these steps to take the changes that youve made into account. Note that weve tested these methods only with the original version of Windows 98. The steps for other verwww.DITnet .co.ae I

CRIB SHEET
R e g i s t ry data is kept in two files located in the C:\Windows dire ct o ry: User.dat and System.dat. Heres how to make copies of these files: l Start Windows Explorer. l Navigate to C:\Windows. l Right click on User.dat and select Copy. l Right click again and select Paste. l A file called Copy of User.dat will appear at the end of Explorers list of files. l Repeat these steps for System.dat. l Should you need to replace the original Registry files, delete the originals and re-name the copies to the original filenames. If youre using Windows 98, theres an easier way to restore Registry files. Choose Shut Down from the Start menu, then restart in MS-DOS mode. At the DOS prompt, type scanreg/restore to start the Registry Checker utility. Select a backup from the list presented, usually the most recent one, and press Enter.

sions of Windows 9x should be similar, h o w e v e r, if not identical. Start by closing all programs. (This isnt strictly necessary, but its generally a good idea in order to avoid complications.) Right click on the My Documents icon, choose Properties and change the Target to D:\ (or whatever directory you want to use as your default first level directory for data). You may also want to right click on the icon, choose Rename and change the name to, say, Data. The next step is to modify the Registry. Choose Start | Run, enter Regedit as the program to run and choose OK. To change the default program dire c t ory, choose Edit | Find, enter Pro g r a mFilesDir in the Find What text box, then choose Find Next. This should eventually bring you to ProgramFilesDir under the key hkey_local_machine\Softw a re \ M i c ro s o f t \ Wi n d o w s \ C u r re n t Ve rsion (which youll see on the status bar on the bottom of the window). The value for ProgramFilesDir should read C:\Program Files. To change it, choose Edit | Modify and type E:\ (or whatever drive and path you want to use as the default for programs), then choose OK. In Windows, certain files are shared by more than one program. These are known as Common Files and are kept in a location specified in the Registry. You may want these files to reside in the same place as your program files. In the same key in the Registry, you should also see the value name CommonFilesDir (the names are in alphabetical order). The de-

fault value for CommonFilesDir is C:\Program Files\Common Files. Change this value to E:\Common Files (or any other drive and path). Note that you must also manually create directories to match the directory names, if any, you enter for P rogramFilesDir and CommonFilesDir. Keep in mind too that these changes will affect only the default dire c t o r i e s Windows uses for installing pro g r a m s in the future. They will not affect the locations of any files already on your hard disk. To change the default data dire c t o r y , re t u rn to the beginning of the Registry by clicking on My Computer at the top of the list in the left-hand pane. Then s e a rch for My Documents. Youll generally want to change the default dire c t ory to D:\ (or whatever drive and path you p refer) wherever it appears in the Registry. This can be a little tricky, howeve r, because you have to exercise some judgement. If you have many pro g r a m s installed, youll likely find default data d i rectories for some of the programs as well as for Windows itself. In such cases, you may need to modify the default path using, say, D:\Wo rdDocs for Mic rosoft Wo rd. If you are naming dire ctories that dont already exist, write down the names as you enter them. When you finish modifying the registry, choose Registry | Close. Now, create any directories you entered as defaults for particular programs and move your data to the appropriate directories. In any case, once youre done, neither Windows nor your applications programs should ever try to use My Documents again.
February 2000

www.pcmag -mideast.com

87

You might also like