O meni:

Sem še relativno mlad (v '30 letih) inženir informatike iz Ljubljane. Teme, ki me najbolj zanimajo: dogodki po svetu (novice, politika), zgodovina, znanost (sploh vesolje)

Sprememba lokacij sistemskih direktorijev

V današnji objavi se bom osredotočil na dva načina, s katerima lahko spremenimo lokacijo “Documents and Settings“, “Program Files” in pa “Common Files” direktorijev (jaz jih npr. zaradi svojih osebnih principov preimenujem v “Settings“, “Programs” in “Common“; med drugim tudi zato, da je ime po 8.3 konvenciji poimenovanja), pri čemer je en način ta, da določiš novo lokacijo pri inštalaciji Windows operacijskega sistema (s t.i. “Unattended” inštalacijo), druga pa je ta, da premakneš omenjeni direktorij pri že obstoječem operacijskem sistemu.

1. Najprej torej prva in lažja varianta s pomočjo t.i. “Unattended” inštalacije, pri kateri se poslužimo “Winnt.sif” fajla (ki je navaden fajl v .txt formatu), ki mora biti na disketi v root direktoriju, disketa pa v floppy-drajvu med inštalacijo. Vsebina omenjenega fajla je v mojem primeru taka.

[Data]
AutoPartition=0
MsDosInitiated=”0″
UnattendedInstall=”Yes”

[Unattended]
UnattendSwitch=Yes
ProgramFilesDir=”C:Programs”
CommonProgramFilesDir=”C:ProgramsCommon”

[GuiUnattended]
ProfilesDir=”C:Settings”

No in pa še nekaj s to temo povezanih diskusij/postov na raznih forumih. Kot prvo je tu naprimer diskusijo naslovljena “Change system dir name in XP” na Ars OpenForum forumu in predvsem tale dva posta.

Potem je tu diskusija “Moving Documents and Settings Folder” (še link do strani 2 in 3), pri čemer bodite še posebej pozorni na poste od uporabnik z nickom “buhlig“, npr. post št. 23 oz. alter linka, ne vem namreč več kateri je pravi. Moj nick na Winforums forumu pa je “satyr“, moj prvi moj post v tem topic-u pa je post št. 23, kasnejši pa še post št. 25

2. Dalje, sem zraven sodi tudi možnost spremembe lokacij (in imen) direktorijev “Cookies“, “History“, “Temporary Internet Files” (jaz ga npr. spremenim v samo “Internet“) in vseh ostalih zgoraj omenjenih direktorijev razen “Program Files” in “Common Files“, kar lahko najbolj preprosto izvedete z MS programom TweakUI (pod My Computer – Special Folders) iz “Powertoys for Windows XP” kolekcije programov, ali pa “ročno” pod tema dvema registry key-ema.

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders

Spremembe imen omenjenih direktorijev so pač, kot že rečeno, meni osebno pomembne zaradi osebnih principov (8.3 konvencija imenovanja fajlov/direktorijev), spremembe lokacij pa zaradi tega, ker so pri meni vse te “temporarne” zadeve (IE zgodovina, temporary fajly oz. cache itd.) locirani na mojem RAM drive-u/disk-u (za več o vsem tem si preberi “THE RAM-DRIVE/DISK PRINCIPLE” sekcijo/članek na “principles1.html” strani na mojem “PC domačem splentem mestu.

V mojem primeru stvar izgleda takole, kar lahko preprosto skopirate in shranite v fajl npr. poimenovan “HKCU-Shell-Folders.reg” (jaz te spremembe vedno sharanim v .reg falj, da lahko vedno znova “apply-jam” te nastavitve) in ga potem “mergate” v registry, seveda pa ga morate sami zmodificirati, da se bo “registry data” ujemala z vašo specifično konfiguracijo.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders]
“AppData”=”D:\Settings\tadej\Data”
“Cookies”=”B:\Caches\Cookie”
“Desktop”=”D:\Settings\tadej\Desktop”
“Favorites”=”D:\Settings\tadej\Favorites”
“NetHood”=”D:\Settings\tadej\NetHood”
“Personal”=”D:\Settings\tadej\Document”
“PrintHood”=”D:\Settings\tadej\PrintHood”
“Recent”=”D:\Settings\tadej\Recent”
“SendTo”=”D:\Settings\tadej\SendTo”
“Start Menu”=”D:\Settings\tadej\Menu”
“Templates”=”D:\Settings\tadej\Templates”
“Programs”=”D:\Settings\tadej\Menu\Programs”
“Startup”=”D:\Settings\tadej\Menu\Programs\Startup”
“Local Settings”=”D:\Settings\tadej\Local”
“Local AppData”=”D:\Settings\tadej\Local\Data”
“Cache”=”B:\Caches\Internet”
“History”=”B:\Caches\History”
“My Pictures”=”D:\Settings\tadej\Document\Pictures”
“Fonts”=”D:\WINDOWS\Fonts”
“My Music”=”D:\Settings\tadej\Document\Music”
“CD Burning”=”D:\Settings\tadej\Local\Data\Microsoft\Burning”
“My Video”=”D:\Settings\tadej\Document\Video”
“Administrative Tools”=”D:\Settings\tadej\Menu\Programs\Tools”

3. In pa kot zadnje, pri spremembi imen od “Application Data” in “Start Menu” direktorijev (v samo “Data” in “Menu“) pa pride do nekega zanimivega efekta, namreč Windows Explorer še vedno vidi imena na star način, to pa sem lepo opisal diskusiji z naslovom “Have you ever seen something like this (folder names) ??” na Ars OpenForum forumu, tole spodaj pa je moj prvi/uvodni post v njej.

A week ago or so, I re-discovered the HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders and HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders registry keys and the options they “offer”; for details see the: What’s the purpose of the “UsrClass.dat” file thread.

So with changing the values of entries inside those two keys, I managed to change the “Application Data” named directory to only “Data“, “Local Settings” to only “Local“, “Start Menu” to only “Menu” and so on. Hehe, the reason for that was my “minimalism principle”, the principle regarding empty spaces and “less than 8 chars in-lenght” directory/file names principle.

And now with my Total Commander file-manager everything seems normal, but with Explorer, I saw this strange thing below for the first time yesterday.

“Start Menu” directory:

http://img99.imageshack.us/img99/5697/startmenudirectory1ft.gif

“Application Data” directory:

http://img99.imageshack.us/img99/6462/applicationdatadirectory4dh.gif

shirker

Čisto za konec pa dodajam še moj prvi/uvodni post iz diskusije “What’s the purpose of the “UsrClass.dat” file“, ki je tudi nekako povezana s vsem tem.

Few days back, there was yet another “revolution” going on regarding my system and my personal principles; in this particular case the “minimalism principle”, the principle regarding empty spaces and finally “less than 8 chars in-lenght” directory/file names principle –:D …

You see, I re-discovered HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders and HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders registry keys, so that now there is only “Data” named directory instead of “Application Data“, “Local” instead of “Local Settings“, “Menu” instead of “Start Menu” and so on. And since my experience was that the OS creates them by itself after the reboot, i.e. this happened when I changed the locations of TEMP/TMP directories (user env. variables) to point to my “RAM drive”; I assumed that it will do the same with these directories, and it surely did, however… they were of course empty after rebooting the computer so I just copied all the contents to new locations.

But the problem is that after the reboot, there was already a new “UsrClass.dat” file created under the following new location (btw. the newly created one was quite a lot smaller in file-lenght and because of that, i.e. smaller size, I speculated that it must contain some sort of table/list of these “Shell Folders”):

D:Settingsuser_nameLocalDataMicrosoftWindows

… and although I see now that the file is “locked” by the NT system process and I don’t know how I managed to do it, I simply over-wrote it with the old backed-up one (luckily it went ok, I was afraid of screwing the profile for a second there), at that time still located under:

D:Settingsuser_nameLocal SettingsApplication DataMicrosoftWindows

Eh well and as an additional info; the two other files with the identical name reside under D:SettingsLocalServiceLocal SettingsApplication DataMicrosoftWindows and D:SettingsNetworkServiceLocal SettingsApplication DataMicrosoftWindows directories.

P.S., Well and my very last idea is to move the whole Start Menu directory-tree into the RAM drive (except “ProgramsStartup“, and I don’t use Programs branch anyway), since I know for sure that there are lots of hard-disk seeks when browsing through sub-menus; I monitored it with Filemon back then. I also just checked it with Process Explorer and it seems that these seeks are caued by shell opening a “File” type handle with path as a “Name” each time.

I suppose my shell uses a different way of menu caching/querying compare to Explorer as Magus` once said back then… Btw., if anyone wants to see it, look at this post in the “post your win nt/2k/xp desktops here” thread (page 160)

/EDIT: Oh nevermind this “last idea” thing, I realised that I could set the locations in my Blackbox shell’s “menu.rc” file (well I already did it, right now) without changing the value of the “Start Menu” registry entry under Shell Folders key.

shirker

Lep pozdrav, Tadej

Advertisements

One Comment on “Sprememba lokacij sistemskih direktorijev”


Oddajte komentar

Fill in your details below or click an icon to log in:

WordPress.com Logo

Komentirate prijavljeni s svojim WordPress.com računom. Odjava / Spremeni )

Twitter picture

Komentirate prijavljeni s svojim Twitter računom. Odjava / Spremeni )

Facebook photo

Komentirate prijavljeni s svojim Facebook računom. Odjava / Spremeni )

Google+ photo

Komentirate prijavljeni s svojim Google+ računom. Odjava / Spremeni )

Connecting to %s