0

I'm trying to do bat file which replaces some dll files under program files\file...

I just can't find solution to do this. I have some win xp and windows 7 computers to run this bat and I'm using xcopy command.

My file copy command is working correctly if destination is something else than under program files.

Does somebody knows the solution for this, please?

1 Answers1

1

Your batch file needs to run elevated. In older windows versions you can also use the runas command to run it as administrator.

wimh
  • 15,072
  • 6
  • 47
  • 98
  • I'm already running bat as admin rights. Command will execute normally and there is no error prompt but it just does not replace old files. – user1272418 Jan 03 '13 at 23:12
  • Then you are maybe trying to replace protected windows files. either by [WPF](http://support.microsoft.com/kb/222193) or [access rights](http://superuser.com/q/124372/57579). – wimh Jan 04 '13 at 09:44