A. Using the following technique you can map some drives, then copy
this change into the default user profile, then perform a little surgery.
Part I: create the Drive entries
- Log into your PC with your domain account (for arguments sake, you are
"DoeJ" in the "Domain" Domain.)
- Map the "X:" drive to \\Server\Share$; Select Reconnect at Login
(obviously you should use valid drive letters/shares for your own
environment)
Part II: Get the entries into a REG file
- Log out, Log back in using a local administrator account.
- Launch REGEDIT32
- Go to the HKEY_USERS window
- Highlight the root key (HKEY_USERS)
- Select Registry | Load Hive
- Browse to the profile of your domain account (Probably: C:\Winnt\Profiles\DoeJ),
select the NTUSER.DAT file; Give this hive the name "DefaultU"
- Notice that under the HKEY_USERS key that "DefaultU" has been
added as a subkey.
- Launch REGEDIT (do not close REGEDT32)
- Browse to HKEY_USERS\DefaultU\Network\X, highlight the X.
- Export this key, noting where you save it to.
- Close REGEDIT (you cannot unload the hive if REGEDIT has it open)
- Highlight the DefaultU Hive in REGEDT32
- Select Registry | Unload Hive
Part III: Import the REG File to the Default User Profile
- Select Registry | Load Hive
- Browse to the profile of the Default User (Typically: C:\Winnt\Profiles\Default
User), select the NTUSER.DAT file; Give this hive the name "DefaultU"
*Note: you must use the same name you used in step 6 in part II for this to
work...
- Import the .REG file you exported in step 12 by double clicking it.
Part IV: Perform Surgery to convert a specific entry to a generic entry
- Browse to HKEY_USERS\DefaultU\Network\X, highlight the X.
- Select the UserName Value (it would now show a REG_SZ with "Domain\DoeJ"
as its data)
- Delete it (The value, not just the data)
- Edit | Add Value: Value Name: "UserName" Data Type: "REG_EXPAND_SZ"
String: "%UserDomain%\%UserName%" (Case Sensitive)
- Highlight the HKEY_USERS\DefaultU Parent Key and unload it (Select
Registry | Unload Hive)
Part V: Test your results
- Temporarily rename the DoeJ profile.
- Log out as the local administrator and log back in with the Domain\DoeJ
credentials. NT will not find your old profile (you renamed it in step 25),
and so then copy the contents of Default user into a new DoeJ folder
and use them.
- Notice that you have an X drive, and did not have to use net use or map it
with explorer.
- Since you are now upset because you lost all your desktop and software
settings, log out as your DoeJ account and then back in as the local
admin. Rename the newly created DoeJ profile folder and Rename your
original DoeJ profile back.
This technique can be used for many things, but I find it most useful for the
printer LPT: ports and network drives on multi-user and KIOSK machines. Note
that only users that do not have profiles already stored on the PC will be
affected by this change. I will typically implement this when I am building a
new PC for a common area where everybody and his brother will be logging into
it; they can use their own credentials, with the ability to get to their home
directories, instead of a generic machine specific account.
Thanks to Steven Yarnot for this