Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to copy a file to all users desktop on Windows 7 by using a batch file with the command:

COPY C:\FOLDER\FILE.TXT %AllUsersProfile%\Desktop

But the message "Permission Denied" is shown. How can i get the batch file to request evaluated privileges so i can click "Yes" instead of just denying?

share|improve this question
up vote 1 down vote accepted

Assuming the user who is going to run the script has rights to put files in the "Public Desktop" folder:

  1. Create a shortcut to the batch file
  2. Right click the shortcut, go into properties
  3. On the Shortcut tab, click Advanced (Label A)
  4. Check the "Run as administrator" box (Label B)

Shortcut Advanced Dialog

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.