Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > XCOPY fails in Vista

Reply
Thread Tools Display Modes

XCOPY fails in Vista

 
 
Ashpoint
Guest
Posts: n/a

 
      08-22-2007
I have used the following .BAT file to update a two folders on my laptop.

Code:
XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
/V /F /R /Y

XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D /E
/V /F /R /Y
The file worked for years when the OS was Windows XP Pro.

Now I have a Vista Business system, the process fails with permissions issues.

Please advise where to look for a resolution

Thanks in advance:

 
Reply With Quote
 
 
 
 
P. Di Stolfo
Guest
Posts: n/a

 
      08-22-2007
Hello,

try right-clicking the .bat and selecting "Run as administrator". Will it
work?

Greetings,
P. Di Stolfo

--
//-----------------------------------------------------------------------------------------------------------
// http://blog.lysorp.com - small Windows Blog in German language
//-----------------------------------------------------------------------------------------------------------

"Ashpoint" <> schrieb im Newsbeitrag
news:15E960D8-B9C0-4234-8528-...
>I have used the following .BAT file to update a two folders on my laptop.
>
>
Code:
> XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
> /V /F /R /Y
>
> XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
> /E
> /V /F /R /Y
>
>
> The file worked for years when the OS was Windows XP Pro.
>
> Now I have a Vista Business system, the process fails with permissions
> issues.
>
> Please advise where to look for a resolution
>
> Thanks in advance:
>

 
Reply With Quote
 
Saucy
Guest
Posts: n/a

 
      08-22-2007
"Ashpoint" <> wrote in message
news:15E960D8-B9C0-4234-8528-...
>I have used the following .BAT file to update a two folders on my laptop.
>
>
Code:
> XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
> /V /F /R /Y
>
> XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
> /E
> /V /F /R /Y
>
>
> The file worked for years when the OS was Windows XP Pro.
>
> Now I have a Vista Business system, the process fails with permissions
> issues.
>
> Please advise where to look for a resolution
>
> Thanks in advance:
>



Create a link to the batch file.

Right-click on the link and select Properties > on the Shortcut tab hit the
Advanced button > check the "Run as administrator" checkbox > click any OKs

Now you run the batch file via the link. 'Hope it works.

Saucy

 
Reply With Quote
 
Saucy
Guest
Posts: n/a

 
      08-22-2007
"P. Di Stolfo" <> wrote in message
news:E6F1CFAF-75F6-4229-AD3D-...
> Hello,
>
> try right-clicking the .bat and selecting "Run as administrator". Will it
> work?
>
> Greetings,
> P. Di Stolfo
>
> --
> //-----------------------------------------------------------------------------------------------------------
> // http://blog.lysorp.com - small Windows Blog in German language
> //-----------------------------------------------------------------------------------------------------------
>
> "Ashpoint" <> schrieb im Newsbeitrag
> news:15E960D8-B9C0-4234-8528-...
>>I have used the following .BAT file to update a two folders on my laptop.
>>
>>
Code:
>> XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D
>> /E
>> /V /F /R /Y
>>
>> XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
>> /E
>> /V /F /R /Y
>>
>>
>> The file worked for years when the OS was Windows XP Pro.
>>
>> Now I have a Vista Business system, the process fails with permissions
>> issues.
>>
>> Please advise where to look for a resolution
>>
>> Thanks in advance:
>>



That should work .. but it can't be run that way automatically .. one must
do it manually. If you adjust a shortcut, the shortcut can be run by some
scheduler etc. etc. At least, that's how I take it.

Saucy

 
Reply With Quote
 
Ashpoint
Guest
Posts: n/a

 
      08-22-2007
I'm not connected to the server for a few days so can't experiment but I did
try running as administrator with the same negative result - permissions
issue.

However, I want to run the file from a desktop shortcut so right-clicking
the .bat and selecting "Run as administrator" would not be my ideal answer.

I read elsewhere that I should "Take Ownership" of the folder and haven't
tried this. Any comment, please.

"P. Di Stolfo" wrote:

> Hello,
>
> try right-clicking the .bat and selecting "Run as administrator". Will it
> work?
>
> Greetings,
> P. Di Stolfo
>
> --
> //-----------------------------------------------------------------------------------------------------------
> // http://blog.lysorp.com - small Windows Blog in German language
> //-----------------------------------------------------------------------------------------------------------
>
> "Ashpoint" <> schrieb im Newsbeitrag
> news:15E960D8-B9C0-4234-8528-...
> >I have used the following .BAT file to update a two folders on my laptop.
> >
> >
Code:
> > XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
> > /V /F /R /Y
> >
> > XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
> > /E
> > /V /F /R /Y
> >
> >
> > The file worked for years when the OS was Windows XP Pro.
> >
> > Now I have a Vista Business system, the process fails with permissions
> > issues.
> >
> > Please advise where to look for a resolution
> >
> > Thanks in advance:
> >

 
Reply With Quote
 
Swingman
Guest
Posts: n/a

 
      08-22-2007
> However, I want to run the file from a desktop shortcut so right-clicking
> the .bat and selecting "Run as administrator" would not be my ideal
> answer.


Strictly FWIW...

Used xcopy in .bat file for years to backup files across networks. Since
getting a laptop with Vista, and on the advice of someone here, and somewhat
reluctantly, I started using SyncToy to sync my laptop and desktop, network
drives, as well as backup files, photos, music to an external USB drive.

I wished I would have switched long ago ... might want to check it out.

http://www.microsoft.com/downloads/d...displaylang=en


--
www.e-woodshop.net
Last update: 8/08/07
KarlC@ (the obvious)


 
Reply With Quote
 
Dave
Guest
Posts: n/a

 
      08-22-2007
"My Documents" is no longer a folder in Vista. It is a junction point.
Try saving the files to "Documents"



"Ashpoint" <> wrote in message
news:15E960D8-B9C0-4234-8528-...
>I have used the following .BAT file to update a two folders on my laptop.
>
>
Code:
> XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
> /V /F /R /Y
>
> XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
> /E
> /V /F /R /Y
>
>
> The file worked for years when the OS was Windows XP Pro.
>
> Now I have a Vista Business system, the process fails with permissions
> issues.
>
> Please advise where to look for a resolution
>
> Thanks in advance:
>

 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      08-22-2007
Hi Ashpoint,

> However, I want to run the file from a desktop shortcut so right-clicking
> the .bat and selecting "Run as administrator" would not be my ideal
> answer.


You can get the same effect by including a "runas" command in your batch
file:

C:\>runas /user:Mydomain\Administrator "XCOPY \\server\network\Files\*.*
"%userprofile%\My Documents\Files\" /D /E /V /F /R /Y"

You need to enter the password for the Administrator, interactively.


> I read elsewhere that I should "Take Ownership" of the folder and haven't
> tried this. Any comment, please.


There are 2 main options:

1) you can grant the user context of your XCOPY command the permissions
needed to read the files from your file server and/or write to your user
Documents directory. This would be the "standard" way of resolving
permissions issues - explicitly and administratively granting permissions to
the users who require them.

2) as administrator, you can take ownership and change permissions on an ad
hoc basis, from the command line. Use the "takeown" command to take
ownership of files and directories from teh command line. Use the "icacls"
command to change permissions on files and directories from the command
line. icacls syntax is a little bit convoluted so you'll probably need to
experiemnt, to find the right command syntax for your situation.

> I'm not connected to the server for a few days so can't experiment but I
> did
> try running as administrator with the same negative result - permissions
> issue.


Vista has shifted the permissions philosopy in Windows from Discretionary
Access Control ("DAC") towards Mandatory Access Control ("MAC"). An aspect
of this is that you don't automatically get permssions to do whatever you
want, just because you are the Administrator. Even the Administrator may
need to explcitly ask for permission to do something. If you are
Administrator, there's not much you can't ultimately take control of ... but
you might not get it by default, out of the box.

MAC security shemes have been common in highly-secure minicoputer
environments since the 1980s. But this is the first time we're seeing MAC in
a widespread mass-market desktop operating system. So it takes some people
by surprise. It's a bit like running Secure VMS on a VAX, circa 1991 :-)

As "swingman" suggested, Microsoft's free SyncToy may be a usefuly
replacement for your batch file. I've used SyncToy with great success, it's
an excellent little utility.


Hope it helps,
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
Saucy
Guest
Posts: n/a

 
      08-22-2007
"Andrew McLaren" <> wrote in message
news:AC6A7F0D-F42C-4ECF-94C6-...
> Hi Ashpoint,
>
>>< chop >

>
> Hope it helps,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
>


Also being discussed is his use of "My Documents" instead of "Documents".
Does Vista use the junction point somehow or will the command flop because
of it?

Saucy


 
Reply With Quote
 
Andrew McLaren
Guest
Posts: n/a

 
      08-23-2007
"Saucy" <> wrote
> Also being discussed is his use of "My Documents" instead of "Documents".
> Does Vista use the junction point somehow or will the command flop because
> of it?


Excellent point! I didn't even notice that (d'oh).

I haven't tested it exhaustively, but my quick test here showed a batch file
having difficulty reading the junction point. Since the OP is using an
easily edited batch file, and not a compiled app, it's probably better to
specific the *real* file path with a plain "Documents", rather than "My
Documents".

Thanks!
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Access is denied" for files with .exe or zip extensions using Xcopy or Robocopy Di Cook Windows Vista General Discussion 6 03-06-2008 12:49 AM
xcopy in vista not copying the files Santel Windows Vista General Discussion 2 11-20-2007 07:19 AM
no xcopy in vista home premium Rycho Windows Vista File Management 3 11-15-2007 03:53 PM
Windows Explorer fails and fails and fails... Bill Windows Vista General Discussion 30 06-10-2007 03:57 AM
Xcopy Continue (/C) switch Windows Vista General Discussion 8 08-09-2006 12:57 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59