Kind of an IT question: How to get past the Windows "access denied" during copy?

Kind of an IT question: How to get past the Windows "access denied" during copy?

Joe-Bouza
Mentor Mentor
5,155 Views
24 Replies
Message 1 of 25

Kind of an IT question: How to get past the Windows "access denied" during copy?

Joe-Bouza
Mentor
Mentor

I have a *.bat file that I want to copy standard cad files from the server to each users machine and cannot figure out how to by pass the windows watch dog. Here is an example: we have fonts that do not ship with autocad that are on the server and I want to copy to each local %username%  using the following 

 

xcopy "\\srvcefs01\Software\Autodesk\ACAD SUPPORT\fonts" "C:\program files\autodesk\autocad 2022\fonts"/Y

 

this gets access denied

 

I know I could map the font folder on the server in options but I'd prefer to install OOTB and copy the files via email link to the bat file so I don't have to adjust every machines search paths I have the same problem with the QTO files

 

xcopy "O:\0-SHEET SETS\CE Sheet Set Prototype\QTO" "C:\ProgramData\Autodesk\C3D 2022\enu\Data\Pay Item Data\Getting Started"/Y

 

yields access denied

 

I thought it was due to copy from server and successfully copied to a temp folder but still get denied copying from temp to the progams.....folders

 

 

 

 

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
5,156 Views
24 Replies
Replies (24)
Message 2 of 25

neilyj666
Mentor
Mentor

Do you have write access to that location?

neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


AEC Collection 2026 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
0 Likes
Message 3 of 25

Jeew-m
Mentor
Mentor

Long path issue?



Jeewana Meegahage
Design Engineer
Autodesk Civil 3D Tutorials
Facebook | YouTube | LinkedIn







0 Likes
Message 4 of 25

Anonymous
Not applicable

An alternative to copying locally is to use a bootstrap lsp in the local folder (C:\Program Files\Autodesk\AutoCAD 20xx\Support) that loads on start and then points to a second lsp that sets all the options you want for the organization. We do this and set support folders for, among other things, linetype files, printer support folders, default templates, page setup overrides, tool palette path, and certain system variables like LEVELOFDETAILOFF. You can set whatever you want in the second lsp so that everyone is using the same stuff. If you did this you'd have to probably get individual users to copy the acad.lsp to their Support folders to get past Windows.

 

The following is what our acad.lsp looks like. It points to MWU.lsp where all the settings are:

(princ "nLoading bootstrap version of acad.lsp...")
(setq myFile "M:\\DESIGN\\C3D\\MWU C3D Files\\Autolisp\\Bootstrap\\MWU.lsp")

(setq existing_paths (getvar "TrustedPaths"))
(setq path_2be_added (vl-filename-directory myfile))

(if (and
(findfile myFile)
(not (vl-string-search path_2be_added existing_paths))
)
(progn
(setq existing_paths (vl-string-right-trim ";" existing_paths))
(setq newPaths (strcat existing_paths ";" path_2be_added))
(setvar "TrustedPaths" newPaths)
(load myFile)
); progn
); if

(princ "HAVE A NICE DAY")
(princ)

0 Likes
Message 5 of 25

AllenJessup
Mentor
Mentor

I don't know the answer either. Although the Long File Path suggestion sounds like it rings true.

Alternatively. You might use something like SyncToy and have it fire off the sync every morning.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 6 of 25

Joe-Bouza
Mentor
Mentor

I am not real knowledgeable  with lisp. Why is it called bootstrap? and does it set the search paths in acad to look on a server?

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 7 of 25

Joe-Bouza
Mentor
Mentor

No pure access denied. I can xcopt to any other folder depth besides the C:\program files

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 8 of 25

Joe-Bouza
Mentor
Mentor

It seems that no one has write access to C:\Program files

 

Our IT guys are drawing blanks on this

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 9 of 25

Joe-Bouza
Mentor
Mentor

Bummer .... Download no longer available. 

 

Sounded good too

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 10 of 25

rl_jackson
Mentor
Mentor

Joe, as an option couldn't you create the "standards" folder(s) directly on C:\ and just point everything there? I do this with all aspects of support stuff (linetypes, plotters, lisp, SDB, etc... ).


Rick Jackson
Survey CAD Technician VI

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 11 of 25

andrewpuller3811
Advisor
Advisor

You will find the standard behaviour for windows is to have most sub folders of the program files folder set to read only for users.

 

Your IT department can set the permissions for certain users over certain folders to give them write access.

They can either do it manually using elevated credentials or by group policy. 

 

I am do not work in IT, but I have had to deal with this issue myself in trying to get files updated to various programmes.



If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 11
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2023
0 Likes
Message 12 of 25

dougnorton
Advocate
Advocate

I'm going to look into drenaud's solution, but here's what I've been doing since our IT guys started denying access to everybody's machines over the network ...

It's a simple batch file, substitute names as necessary

 

IF yournamehere=="" GOTO STARTOVER
copy "p:\_acad_support\epc-dot.*" "C:\Users\yournamehere\AppData\Roaming\Autodesk\C3D 2020\enu\Support"
copy "p:\_acad_support\PDOT*.PC3" "C:\Users\yournamehere\AppData\Roaming\Autodesk\C3D 2020\enu\PLOTTERS"
copy "p:\_acad_support\ADOBE*.PC3" "C:\Users\yournamehere\AppData\Roaming\Autodesk\C3D 2020\enu\PLOTTERS"
copy "p:\_acad_support\_CDOT*.CTB" "C:\Users\yournamehere\AppData\Roaming\Autodesk\C3D 2020\enu\PLOTTERS\PLOT STYLES"
copy "p:\_acad_support\epc*.dwt" "C:\Users\yournamehere\AppData\Local\Autodesk\C3D 2020\enu\Template"

goto fini
:STARTOVER
ECHO Input Username.
pause
:fini
PAUSE

 

I called it dotcopyyournamehere dot bat

This copies linetypes, plot styles, plotter configs, and most importantly Templates to where they're needed.

 

I got blocked twice today trying to post this. It's not dangerous, this knowledge...

Cheers,

0 Likes
Message 13 of 25

Joe-Bouza
Mentor
Mentor

Hi @dougnorton  this is what I am doing with xcopy. the problem is the font files and QTO files they reside in C:\Progams\..... and windows will not allow things to be written to this location

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 14 of 25

AllenJessup
Mentor
Mentor

@Joe-Bouza wrote:

Bummer .... Download no longer available. 

 

Sounded good too


Alternatives

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 15 of 25

Anonymous
Not applicable

I'm not sure why it's called bootstrap. And someone from here helped a lot when I implemented it here, I don't know lisp that well either. But given examples I got it to work.

 

Basically, when a user starts acad it loads acad,lsp which tells acad to also go on the network and load the bootstrap lsp (MWU.lsp in my case). MWU.lsp sets all the options you want to set: support paths, plotter support, templates, etc. etc. You can set anything you want.

 

The beauty of it is that all the standard files reside on the network. There's only one set of files to maintain. If some path or whatever changes you make the changes to MWU.lsp. Once you get acad.lsp copied to local support folders you never touch that machine again until a new release is installed (then you put acad.lsp in that Support folder). So you keep everyone on the same page and do updates in the background and everyone is always up to date by maintaining just the networked files.

 

BTW, I know you can write to Program Files if you set permission to Full control through the folder properties. I would try each user going to folder properties (or you if you are logged into the machine) and give themselves/yourself total Full control read/write permissions to the folder. Go to the Security tab, Edit button. IT may have to do this if access is denied.

0 Likes
Message 16 of 25

AllenJessup
Mentor
Mentor

@Anonymous Bootstrap probably for the same reason that when you Boot your computer is pulling itself up by its own Bootstraps. i.e. "In order to get out of a bad situation you often have to pull yourself up by your own bootstraps"

 

@Joe-Bouza 

see THIS article

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 17 of 25

Anonymous
Not applicable

I'm pulling myself up by the bootstraps all the time.

 

As for the Windows Access denied when writing to Program Files, you may first have to take ownership of the folder. Or do it just for Autodesk. After taking ownership, you close the window, re-open it and set permissions to Full control. See https://www.makeuseof.com/tag/fix-access-denied-folders-windows-10/  for more info.

0 Likes
Message 18 of 25

dougnorton
Advocate
Advocate

Joe, you're right, the copy and xcopy do the same thing. And my routine only takes care of supports type stuff outside of the Program Files level. Now here's where it gets interst frustrating. Even though I am administrator on my machine, I can't do any edits on my own LISP routines that are in

C:\Program Files\Autodesk\AutoCAD 2020\Support\en-us

But I can copy them elsewhere, edit them, and then re-copy them back into the Directory. It does the Windows "Are you sure you want to make changes to this Machine?" type thing, but it lets me finish each time.

Now I'm curious if it has to do with manually copying/placing the files versus your xcopy version of doing the same thing.

I had to get three levels of bosses' permissions to get me added as Admin on my team's machines, and there are still directories that I'm not allowed any access to. I do understand your frustrations.

 

Doug

 

0 Likes
Message 19 of 25

Joe-Bouza
Mentor
Mentor

Thanks Doug. Yes a Royal PITA

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 20 of 25

chriscowgill7373
Mentor
Mentor

Sorry I'm late to the party, are you running this from a batch file of some sorts?  are you running your command prompt in elevated permission mode? It could just be a windows thing, where normal permissions do not allow copying to the program files or program data location.  If you launch an elevated command prompt (Win+R  type CMD, hold control and shift when you press enter to run it) and paste the lines there, does it still deny access?


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2026 on Windows 11

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes