File copy permissions issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
To my amazement, it only took me two weeks of Googling and amateurish hacking to convert an existing VB6 program to a VB.Net equivalent. It is functioning correctly, except for the formerly trivial last step.
The program basically finds or creates a plt file and then copies it to the queue of a large format Xerox printer. This has worked without issue in 32bit XP, but in 64bit Win 7, I get permission errors during the file copy action. Using the Scripting method, I get System.Security.SecurityException CTL_E_PERMISSIONDENIED. Trying System.IO.File.Copy, I instead get System.UnauthorizedException mscorlib.dll Access the to path is denied.
As a test, I ran the command line equivalent (COPY foo.plt networkprintername). In XP, I received a print out as expected; in Win 7, the return line is 'Access is denied. 0 file(s) copied.' What is interesting is if I have that printers' queue window open when I send the command line test, an entry briefly appears and disappears with a Document Name starting with the word 'Remote'.
So far, neither I nor IT can figure out a permissions workaround for this; just curious if anyone else had run into this same problem.
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000