Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"User mapped section open" 1

Status
Not open for further replies.

Nelviticus

Programmer
Sep 9, 2003
1,819
GB
I'm using a batch file to copy a file from the network to a user's PC. The user is an admin on their machine but when the script hits the 'xcopy' line it produces this error:

"The requested operation cannot be performed on a file with a user-mapped section open"

The file isn't in use by any applications at the time. It's a Word template in the user's Word Startup folder and Word isn't running. Any ideas what's causing the problem and how to get around it?

Thanks


Nelviticus
 
Is the Users Word startup folder on a drive allocated through his setup in Active Directory? I've seen similar error messages when this is the situation.

If you are sending a template to each user then I would put it in the default template directory on the local drive, depending on Office version it's usually

c:\documents and settings\username\application data\microsoft\templates or something like.

Hope this helps
 
The Startup folder is in the standard place, i.e. C:\Documents and Settings\<username>\Application Data\Microsoft\Word\STARTUP.

It needs to be there rather than their templates directory because it's not a "template for new documents" but a "template that contains code and toolbars" if you know what I mean.

I just can't understand why several users with full rights to their machines are essentially getting "file locked" messages for files that aren't locked.

Nelviticus
 
I presume you are executing the batch file from the login process. If this is the case and you are using roaming profiles, then it could be a timing issue - the client PC is still downloading the roaming profile to he local copy and trying to update the files in the same place at the same time.

If your users login in the usual fashion and wait for their profiles to completely download, can they run the xcopy batch file successfully at that point ?

I've seen a similar issue and we got around it by using KIXtart, setting a pause for 10 seconds then executing the xcopy batch file.

Hope this helps

MD
 
It will be part of the login script but at the moment we just have a small group of test users running a batch file manually after they're already logged in.

It even fails if we run the xcopy command by itself from a DOS prompt. Unfortunately we only want to copy the file if it's newer so I can't use del first.

Is there any way to test what is locking a file? I'm thinking maybe the file is locked, although if Word isn't running then I can't imagine what's locking it. We all use the same AV software so you'd think that either everyone would suffer the same problem or no-one.

Nelviticus
 
What version of Office are you running ?

Again, I've hit issues with Office 2003, especially Outlook 2003 when it's set to use Word as its text manager. You can check to see if this is case by looking at the processes to see if Winword is running.

If it is, uncheck the Word boxes in the Outlook Mail format options, close Outlook and try again.

But like you I'm running out of ideas...

MD
 
Well have a star for trying, you've at least given me some new ideas! Good point about Outlook, they shouldn't be set to use Word for email but it's worth checking. We're using Office 2002.

I'm currently looking into whether some people haven't been set up as local admins, although even if they haven't they should have write access to that folder.

Regards

Nelviticus
 
Thanks for the star !

Don't forget to post the resolution when you find it.

Regards

MD
 
Well what do you know, the problem was Outlook. If it has Word set as its message editor then when it starts up it will lock the same files as Word does.

This is good news as once we go live the script will be run at login, before Outlook starts up.

Thanks for your help!

Nelviticus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top