Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to map to a network space a mapped drive such as S: for some other jobs. My box is Windows Server 2008. In Windows Server 2008, I can create a scheduled task with a bat job, and I can specify it runs when Windows is reboot or Log on without specified user. It like a service with local system. The bat contains net cmd to map the drive:

net use S: \\netdrive1\space1 pwd /user:oneUser

Then I reboot the box. It looks like that the scheduled job did run. I can check from the Task Scheduler job's history. However, the S: drive cannot be mapped. If I just run the bat from the command line. It works fine. It seems that I have to log on the box to make the mapped drive. Not sure if it is possible to let Windows to run the job as local system when it reboots to make the drive available?

For my case, the network drive is at a Unix box.

As I mentioned above, I have some other dependency scheduled jobs under Windows local system. Therefore, I have to make the network space available without any user log on.

share|improve this question
    
Server admin stuff may be better asked at serverfault.com –  JNK Sep 1 '10 at 20:16
add comment

1 Answer

up vote 1 down vote accepted

From a question asked on StackOverflow:

You'll either need to modify the service, or wrap it inside a helper process: apart from session/drive access issues, persistent drive mappings are only restored on an interactive logon, which services typically don't perform.

The referenced post goes into some detail so you may want to have a look.

If your other jobs are also batch files, they'll need to perform the necessary mapping themselves.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.