Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > xcopy in vista not copying the files

Reply
Thread Tools Display Modes

xcopy in vista not copying the files

 
 
Santel
Guest
Posts: n/a

 
      11-20-2007
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.
 
Reply With Quote
 
 
 
 
Andrew McLaren
Guest
Posts: n/a

 
      11-20-2007
"Santel" <> wrote...
> 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


 
Reply With Quote
 
Michael Walraven
Guest
Posts: n/a

 
      11-20-2007
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" <> wrote in message
news:49ffa69e-e4f9-487e-bb0c-...
> 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.


 
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
vista copying files from wk3 x64 Homer J. Simpson Instructor at Large Windows Vista Networking 0 01-14-2008 05:15 AM
need help with copying files over to new pc with vista! shunter4044@yahoo.com.NO_SPAM Windows Vista File Management 2 11-27-2007 05:46 AM
XCOPY fails in Vista Ashpoint Windows Vista General Discussion 12 08-23-2007 05:13 AM
Copying files from XP to Vista Petersen Custom Software Windows Vista Networking 1 07-30-2007 01:16 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