Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application running as a service under a certain user, but for some reason when the machine is (re)started and the service starts it does not load that particular user's profile (including its drive-mappings etc).

Is there any way to specify that for a service the full (local) profile (incl. the mappings) is loaded?

The machine is a win2k sp2 enterprise edition.

share|improve this question
Duplicate, see… – chankster Jun 29 '09 at 12:38

As far as I know, USERINIT.EXE restores the "mapped drives" specified in the profile of a user. The user's profile will load, when logging-on to run a service, but USERINIT.EXE isn't going to get called and the "mapped drives" won't be restored.

share|improve this answer
Evan, yeah seems so.. gonna have to find another way around. thanks though! – Jörg B. Jun 29 '09 at 22:38

I'm not sure I know a way to do this.

Generally, drive mappings are part of an active-user, interactive log on session and drives don't get mapped when user credentials are used for service sessions.

Depending on what you're trying to do and what the application in question will tolerate, could you use the actual UNC path of the mapped-drive resource instead?

This is generally what we do for access to remote resources when there's no logged on session. For example, run a script as a scheduled task under with the needed credentials and then target the UNC instead of a mapped drive.

Also, though it won't work in your case with Windows 2000, my understanding is that Server 2008 supports symlinks to network resources.

share|improve this answer
Unfortunately not, I can't. The trouble is that these mappings are needed for the application itself (it reads data that already contains hard links to e.g. 'n:\...' which is mapped during logon for all users in the domain automatically to a server-share. As it seems (also in the duplicate/other post chankster mentioned), I either do have to build in a workaround that uses UNC paths (and knows about the mappings and handles them in the code for the links to them), or map these drives in the service-app itself each time started. Meh. But thanks! – Jörg B. Jun 29 '09 at 22:37

How is the application running as a service? Is it an internal function of that application or are you using another means to moke a non-service run as a service? The reason I ask is that for the later you could run a batch file wich maps the drives before calling the main application.

Silly question perhaps but those drives were mapped with persistence were they not?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.