User Account Control file access issue

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
dstierman
Posts: 5
Joined: Tue Oct 02, 2012 3:01 am

User Account Control file access issue

Post by dstierman » Wed Apr 06, 2016 1:34 pm

I have a vb script that copies files from other users on a PC. It is run as an administrator. The problem that I have is if UAC is turned on, I need the account of the admin that is moving the files to have previously accessed that users profile, otherwise the process will fail. For example clicking on profile folder and selecting continue to the UAC message to gain access. Once the admin account has clicked continue to be granted access to the users profile, then the file moves will work successfully. Does anyone have a good way to automate or work around this issue without logging in and accessing the users profile folder as the admin account? Thanks for any help that you may have.

User avatar
jvierra
Posts: 11558
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: User Account Control file access issue

Post by jvierra » Wed Apr 06, 2016 1:56 pm

It is not possible to do what the SYSTEM does when it adds the admins to the profile. You can only take direct ownership and add the admins to the folders. This is much more than what the system does.

I recommend using a more standard method of copying your files.

Locked