Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - xcopy in vista not copying the files

Reply
 
Old 11-20-2007   #1 (permalink)
Santel


 
 

xcopy in vista not copying the files

Hi,

I have a batch file to copy some files with xcopy command.

xcopy "E:\Test\*" "C:\Program Files\Test1\" /q /y

In WindowsXP it is working fine, but in vista it is not copying due to
permission. Anyone please suggest me if there are any commands we have
to include to give the permission setting.

My System SpecsSystem Spec
Old 11-20-2007   #2 (permalink)
Andrew McLaren


 
 

Re: xcopy in vista not copying the files

"Santel" <santel_helvis@xxxxxx> wrote...
Quote:

> I have a batch file to copy some files with xcopy command.
> xcopy "E:\Test\*" "C:\Program Files\Test1\" /q /y
> In WindowsXP it is working fine, but in vista it is not copying due to
> permission. Anyone please suggest me if there are any commands we have
Hi Santel

That is normal behaviour in Vista. The directory tree under "Program Files"
is protected, so that you cannot write files there without the Administrator
privilege. This is to prevent viruses and trojans hijacking your program
files.

Even if you are logged in as the Administrator, you still need to explicitly
run the batch file "as administrator" to write to these directories.
Right-click the batch file and choose "Run as Administrator" from the
context menu. Or, open a Command Prompt by right-clicking the Command Prompt
icon and choosing "Run as Administrator" and then run the batchfile from
this administrative command prompt.

The other alternative is to grant write permissions to your user context,
for the "C:\Program Files\Test1" directory - if you're happy to have files
written to this location. Right-click the "C:\Program Files\Test1" directory
in Explorer, choose Properties, Security, and use the ACL editor to grant
the necessary permissions to your user for that directory.

Hope it helps,
Andrew


My System SpecsSystem Spec
Old 11-20-2007   #3 (permalink)
Michael Walraven


 
 

Re: xcopy in vista not copying the files

C:\Program Files\ is a protected system area. It is not to be used for
'user' manipulation. Installation of programs into this area is done by the
'Trusted Installer' account. In order to allow a user to write to this
protected location you will have to bypass built in security features of
Vista.

Michael


"Santel" <santel_helvis@xxxxxx> wrote in message
news:49ffa69e-e4f9-487e-bb0c-c18e80272589@xxxxxx
Quote:

> Hi,
>
> I have a batch file to copy some files with xcopy command.
>
> xcopy "E:\Test\*" "C:\Program Files\Test1\" /q /y
>
> In WindowsXP it is working fine, but in vista it is not copying due to
> permission. Anyone please suggest me if there are any commands we have
> to include to give the permission setting.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Xcopy /D copies all files, not just newer Vista General
"Access is denied" for files with .exe or zip extensions using Xcopy or Robocopy Vista General
vista copying files from wk3 x64 Vista networking & sharing
need help with copying files over to new pc with vista! Vista file management
Copying files from XP to Vista Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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