MDFS::Docs.Comp.Windows.Hints.Network | Search |
%WINDIR%\Profiles\<username>
. This not
only fills up the hard drive, these files can be examined by other users.
Some of the PCs where I work are regularly used by 40 or 50 different users, these users regularly use over a dozen different client machines. Some of these machines had more than half of a 2Gb hard drive filled with user profile information, and it was taking one user over half an hour to log on, such was the quantity of crap that was being thrown over the network onto the client machine.
Configuring users' pathnames to refer to their network home area fixes this. The relevent registry folders are
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
H:
to the user's home area.
H:\Config - Configuration settings, etc. H:\Config\AppData H:\Config\Desktop H:\Config\Favourites H:\Config\History H:\Config\NetHood H:\Config\Recent H:\Config\Start Menu H:\Config\SendTo H:\Docs - Documents folder, often set to "My Documents" H:\Temp - Temporary files H:\Temp\Cookies H:\Temp\InternetI set the registry entries as follows:
REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders] "SendTo"="H:\\Config\\SendTo" "Recent"="H:\\Config\\Recent" "Desktop"="H:\\Config\\Desktop" "Programs"="H:\\Config\\Start Menu\\Programs" "Fonts"="C:\\%windir%\\Fonts" "Personal"="H:\\Docs" "Favorites"="H:\\Config\\Favourites" "NetHood"="H:\\Config\\NetHood" "PrintHood"="H:\\Config\\PrintHood" "Templates"="C:\\%windir\\ShellNew" "AppData"="H:\\Config\\AppData" "Start Menu"="H:\\Config\\Start Menu" "Startup"="H:\\Config\\Start Menu\\Programs\\Startup" "Cache"="H:\\Temp\\Internet" "Cookies"="H:\\Temp\\Cookies" "History"="H:\\Config\\History" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders] "AppData"="H:\\Config\\AppData" "Desktop"="H:\\Config\\Desktop" "Favorites"="H:\\Config\\Favourites" "NetHood"="H:\\Config\\NetHood" "PrintHood"="H:\\Config\\PrintHood" "Recent"="H:\\Config\\Recent" "SendTo"="H:\\Config\\SendTo" "Start Menu"="H:\\Config\\Start Menu" "Programs"="H:\\Config\\Start Menu\\Programs" "Startup"="H:\\Config\\Start Menu\\Programs\\Startup" "Cache"="H:\\Temp\\Internet" "Cookies"="H:\\Temp\\Cookies" "History"="H:\\Config\\History" "Local AppData"="H:\\Config\\Local\\AppData" "Personal"="H:\\Docs"This can be downloaded as file Paths.reg. Once a user's paths have been changed to point to their networked home area, everything in
%WINDIR%\Profiles\<username>
can be
deleted. In future, only two user configuration files will get copied in
there on logon.
With WindowsNT clients, the administrator can change a registration key so that the username box is cleared after logon. The registration key does not exist on Win9x. However, JSI Inc supply a very useful free utility on one of their very useful Hints and Tips pages called ClrName.
The download comes with very clear installation instructions. Essentially, all you need to do is put the executable somewhere useful and edit a registry entry to point to it.
Our server connects drive G: to a group shared area that all users have
access to, so I put clrname.exe
G:\Lib\
and then create the following registry entry:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run] "ClearName"="G:\\Lib\\Clrname.exe"
I solved this problem by writing a little utility
ChkLogOn.exe that checked if the username was
unset, and if so it shut the machine back down. Rather brute force, but it works.
I put this in the C:\Windows\System
directory of all our
Windows 95/98 machines and put a shortcut in
C:\Windows\Start Menu\Programs\Startup
to run it.
It's written as the following compiled BBCBasic program ChkLogOn.bbc:
DIM alen% 3,name% 256 !alen%=255:SYS "GetUserName",name%,alen% TO r% IFr%=0:SYS "ExitWindowsEx",3:*Quit *QuitAt some point I may get around to writing it in a few bytes of machine code.
Here are some useful registry settings.