Link to home
Create AccountLog in
Windows Batch

Windows Batch

--

Questions

--

Followers

Top Experts

Avatar of Carlo
Carlo🇺🇸

ROBOCOPY files to SYSWOW64 Access Denied
Trying to use ROBOCOPY in a batch program to copy files from C:\folder to C:\Windows\syswow64 and I am gettting an access denied. Using /COPYALL /s as a switch.

Tried running the CMD also with administrator rights and the same thing. Please advise.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of JohnJohn🇨🇦

That is a highly protected folder and is meant to keep system files Windows needs. It is meant to be able to repair your system (as one main feature) using DISM.  

You should not be trying to copy things into this folder lest you make your system unstable later or even not working.

Avatar of Ben Personick (Previously QCubed)Ben Personick (Previously QCubed)🇺🇸

Right click on the folder
Click properties
Go to security
Change ths owner of the folder to yourself.

Close the properties of the folder.

Open the properties again
go to security
set yourself as having full control


Now run your robocopy from an elevated command prompt

Avatar of CarloCarlo🇺🇸

ASKER

::: Thanks for the Info John but I am not replacing anything in this folder. Just adding some DLL files and such.


::: Ben, I am logged in as an administrator, I have total admin rights to the system.
I still run the CMD with administrator rights but no go.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


At Carlo,

  After taking ownership of the folder (and replacing sub itemd) and setting yourself full control (and replacing sub items)?

what was the actual robocopy command you used?

Avatar of CarloCarlo🇺🇸

ASKER

Ben the command I used was:

ROBOCOPY /COPYALL /s C:\abc C:\windows\syswow64

This did not work

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of CarloCarlo🇺🇸

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Ahh here is the remaining issue!

 ROBOCOPY /COPYALL /s

RoboCopy MUST follow this format:

ROBOCOPY "C:\abc" "C:\windows\syswow64" *


The Command Requires that Source and Destination are the first two items, and that the file Glob comes 3rd, and all options follow that.
ie Usage :: ROBOCOPY source destination [file [file]...] [options]

The following Robocopy command would be functional:

ROBOCOPY "C:\abc" "C:\windows\syswow64" * /COPYALL /s

Open in new window

Windows Batch

Windows Batch

--

Questions

--

Followers

Top Experts

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.