3
Modifying Directory Defaults   eft to its own devices, M i c rosoft Wi n d o w s 98 automatically uses C : \ Program Files as the default directory for in- stalling new programs and C:\My Documents as the de- fault for data. If you’ve opted to have a single logical drive on your hard disk, these de- faul ts may well be re as o n a b l e . Putting all your programs in the Progra m Files dire c t o r y keeps them all in one place and in a hie rarchical structure , and you’ll always know where they are. Similarly, the My Doc- uments directory keeps all of  your data in one place—though  yo u sho uld cr eate a h ier arc h i- cal structure of directories un- der My Documents to help you locate particular files. Unfor- tunately, these defaults can also create problems. For example, you may  choose to create multiple logical drives to better organise your hard disk. The dif- f e rent drives can serve the s ame pur- pose as dividers in a file drawer—to let  yo u sep ara te your fi les int o me ani ng ful categories.  You could put Wi ndows a nd other sys- te m- related files (anti-vir us prog ra m s , file utilities and the like) on drive C:, data on drive D:, and application programs on drive E:. That way, w hen you’re looking for a file, you know immediately—based on the type of file—which drive to look on. This can speed up the search, whether you’re us- ing the Start | Find command or searching manually. This kind of organisation also makes it easier to back up your files since you can, for example, easily back up just your data files by backing up the one data drive.  What eve r th e mer its of di vid - ing your hard disk into logical drives, Windows will still de- fault to putting programs on drive C:. Most installa tion ro u- tines let you change the desti- nation drive for the installa- tion, but having to make the change every time you install a p rogram is an unnecessary  c h o re. The problem is similar w ith C:\My Documents, assuming  you wa nt to put your dat a on a diff e rent d rive or even u se a m o re professi onal sounding dire c t o r y name, such as Data. For network ad- ministr ators, the Windows pre f e re n c e for C:\My Documents can be more than annoying. It’s not unusual to want users to store their data on a network hard disk, Windows has default directories for placing documents and applications: c:\Pro gram Files and c:\My Documents. While this makes sense if you’re using only one drive, it c an cause problems if you’ve divided your h ard drive into sev eral parts. In this guide we detail how y ou can change the default d i rectories for both applicati ons and downloaded files. M O DIFY YOUR DEFA uLTS L 86 February 2000  www.DITnet  .co.ae    www.pcmag -mideast.com CHANGING DEFAULTS: The Data folder is now the root directory on drive D:, which is named Data.

Modifying Directory Defaults

Embed Size (px)

Citation preview

8/13/2019 Modifying Directory Defaults

http://slidepdf.com/reader/full/modifying-directory-defaults 1/2

Modifying Directory Defaults  

eft to its own devices,M i c rosoft Wi n d o w s98 automatically usesC : \ P rogram Files as

the default directory for in-stalling new programs andC:\My Documents as the de-fault for data. If you’ve optedto have a single logical driveon your hard disk, these de-faul ts may well be re a s o n a b l e .Putting all your programs inthe Progra m Files dire c t o r y keeps them all in one placeand in a hierarchical structure ,and you’ll always know wherethey are. Similarly, the My Doc-uments directory keeps all of  your data in one place—though

 you should cr eate a h ierarc h i-cal structure of directories un-der My Documents to help youlocate particular files. Unfor-tunately, these defaults canalso create problems.

For example , you may  choose to create multiple logical drivesto better organise your hard disk. The dif-f e rent drives can serve the same pur-pose as dividers in a file drawer—to let you separate your fi les into meaningfulcategories.

 You could put Windows and other sys-t e m - related files (anti-virus pro g r a m s ,file utilities and the like) on drive C:, dataon drive D:, and application programs ondrive E:. That way, when you’re lookingfor a file, you know immediately—based

on the type of file—which driveto look on. This can speed upthe search, whether you’re us-ing the Start | Find commandor searching manually. Thiskind of organisation also makesit easier to back up your filessince you can, for example,easily back up just your datafiles by backing up the onedata drive. Whatever the mer its of divid -

ing your hard disk into logicaldrives, Windows will still de-fault to putting programs ondrive C:. Most installa tion ro u-tines let you change the desti-nation drive for the installa-tion, but having to make the

change every time you install ap rogram is an unnecessary c h o re.

The problem is similar w ithC:\My Documents, assuming you want to put your data ona diff e rent d rive or even use a

m o re professional sounding dire c t o r y name, such as Data. For network ad-ministr ators, the Windows pre f e re n c efor C:\My Documents can be more thanannoying. It’s not unusual to want usersto store their data on a network hard disk,

Windows has default directories for placing documents and applications: c:\Program Files and c:\My

D o c um e n ts. While this makes sense if you’re using only one drive, it can cause problems if you’ve

divided your hard drive into sev e ral parts. In this guide we detail how you can change the defau l t

d i rectories for both applications and downloaded files.

MODIFYYOUR DEFAuLTS

L

86 February 2000   www.DITnet   .co.ae     www.pcmag   -mideast.com

CHANGING DEFAULTS: The Data folder is now the root directory on drive D:,

which is named Data.

8/13/2019 Modifying Directory Defaults

http://slidepdf.com/reader/full/modifying-directory-defaults 2/2

 

Modifying Directory Defaults

 whi ch ensu res th at the da ta wi ll bebacked up on schedule when the networkis backed up. And for data files that morethan one user needs to modify, this alsoe n s u res that there won’t be diff e re n t

 versions of the f ile on various local harddisks, each with a di ff e rent set of mod-i f i c a t i o n s .

 Whateve r your reason for wanting touse some other name for your first lev-el data directory, the Windows prefere n cefor C:\My Documents means you’ll haveto go through the inconvenience of telling

 Windows p rograms to go to a diff e re n tfirst level directory than they wi ll use by default—every time you want to save. Also, if you keep your data in a non-de-fault directory, then the My Documentsicon on the Desktop and in Windows Ex-p l o rer will not actually take you to your

data. And it means that even if you deleteor re-name the My Documents dire c t o-ry, some programs will occasionally re -c reate the directory fo r you if you don’tkeep a careful eye out for where thosep rograms t ry to save your data fil es.

The good news is that it’s not diff i c u l tto modify Windows and change thenames, locations or both of the defaultd i rectories for programs and data. Thep ro c e d u re involves modifying the Reg-istry, which means it comes with theusual warnings: you need to be care f u lnot to change anything you don’t meanto change, because in the worst case, youcan make your system unusable. If thathappens, you’ll need to re-install Wi n-dows and all your programs. But if you’recomfortable with modifying the Reg-istry, the actual pro c e d u re is straight-f o r w a rd.

 You can change either of the default di-rectories or you can change both. For thisexample, we’ll assume that you want tochange both. To change only one, justignore the directions for changing the oth-e r. We’ll a lso assume you want to changethe default data directory to D: and thedefault program direc tory to E:. If you’drather use a diff e rent drive or sub-d i rectory, simply substitute the drive

and pathname in the example.T h e re’s one other important assump-

tion—that you are starting with the Wi n-dows defaults for program and data di-rectories. If you’ve done anything tochange this in Windows itself (as op-posed to setting default directories forparticular programs), you’ll need to re-t u rn to the defaults or modify these stepsto take the changes that you’ve made intoaccount. Note that we’ve tested thesemethods only with the original versionof Windows 98. The steps for other ver-

sions of Windows 9x should be similar,h o w e v e r, if not ident ical.

Start by closing all programs. (Thisisn’t strictly necessary, but it’s general-ly a good idea in order to avoid com-plications.) Right click on the My Doc-uments icon, choose Properties andchange the Ta rget to D:\ (or whatever di-rectory you want to use as your defaultfirst level directory for data). You may also want to right click on the icon, chooseRename and change the name to, say,D a t a .

The next step is to modify the Reg-istry. Choose Start | Run, enter Regeditas the program to run and choose OK.To change the default program dire c t o-ry, choose Edit | Find, enter Pro g r a m-FilesDir in the Find What text box, thenchoose Find Next. This should eventu-ally bring you to ProgramFilesDir un-der the key hkey_local_machine\Soft- w a re \ M i c ro s o f t \ Wi n d o w s \ C u r re n t Ve r-sion (which you’ll see on the status baron the bottom of the window).

The value for ProgramFilesDir shouldread C:\Program Files. To change it,

choose Edit | Modify and type E:\ (or whatever dr ive and path you want touse as the default for programs), thenchoose OK.

In Windows, certain files are shared by more than one program. These are knownas Common Files and are kept in a lo-cation specified in the Registry. You may  wan t these fil es to res ide in the sameplace as your program files. In the samekey in the Registry, you should also seethe value name CommonFilesDir (thenames are in alphabetical order). The de-

fault value for CommonFilesDir is C:\Pro-gram Files\Common Files. Change this

 value to E:\Common Fil es (or a ny oth-er drive and path). Note that you mustalso manually create directories to matchthe directory names, if any, you enter forP rogramFilesDir and CommonFilesDir.Keep in mind too that these changes wil l affect only the default dire c t o r i e s Windows uses for instal ling pro g r a m sin the future. They will not affect the lo-cations of any files already on your hardd i s k .

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 topof the list in the left-hand pane. Thens e a rch for My Documents. You’ll gener-ally want to change the default d ire c t o-ry to D:\ (or whatever drive and path youp refer) wherever it appears in the Reg-istry. This can be a little tricky, howev-e r, because you have to exercise somejudgement. If you have many pro g r a m sinstalled, you’ll likely find default datad i rectories for some of the programs as

 wel l as for Windows itself . In such cas-

es, you may need to modify the defaultpath using, say, D:\Wo rdDocs f or Mi-c rosoft Wo rd. If you are naming dire c-tories that don’t already exist, write downthe names as you enter them. When youfinish modifying the registry, chooseRegistry | Close. Now, create any di-rectories you entered as defaults for par-ticular programs and move your data tothe appropriate directories. In any case,once you’re done, neither Windows nor

 your appl ications progra ms should evertry to use My Documents again.

www.DITnet   .co.ae     www.pcmag   -mideast.com February 2000 87

R e g i s t ry data is kept in two files located in the C:\Windows dire c-

t o ry: User.dat and System.dat. Here’s how to make copies of thesef i l e s :l Start Windows Explore r.

l Navigate to C:\Wi n d o ws.

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 Explorer’s list of 

file s .l Repeat these steps for System.dat.

l Should you need to replace the original Registry files, delete the origi-

nals and re-name the copies to the original filenames.If you’re using Windows 98, there’s an easier way to restore Registry files.

Choose Shut Down from the Start menu, then resta rt in MS-DO S m o d e .

At the D OS p rompt, type scanre g / re s t o re to start the Registry Checkeru t i l i t y. Select a backup from the list presented, usually the most re c en t

one, and press Enter.

CRIB SHEET