Support for My AutoRun

Top Rated Autorun Software!

How can I copy a file to the users desktop?

54,852 views - Updated 10-28-2026 - My AutoRun FAQ

AutoRun Wizard does not copy files itself, but you can autorun a small batch file that does.

Create the batch file

  1. Open Notepad and paste this, changing Brochure.pdf to your file name:
    @echo off
    for /f "usebackq delims=" %%D in (`powershell -NoProfile -Command "[Environment]::GetFolderPath('Desktop')"`) do set "DESK=%%D"
    copy /Y "%~dp0Brochure.pdf" "%DESK%\"
  2. Choose File > Save as, set "Save as type" to All files, and name it copyfile.bat (make sure it does not end in .txt).
  3. Put the batch file and your file in the Base Folder, and add the batch file as one of your autorun files.

Why it is written this way

  • %~dp0 is the folder the batch file runs from (the root of your disc), so it works whatever drive letter the disc gets.
  • Many Windows 10 and 11 PCs keep the Desktop in OneDrive, so %USERPROFILE%\Desktop is not always the real desktop. Asking Windows for the Desktop folder (the PowerShell line) always finds the right one.

Copying files onto someone's PC should be something they expect. Tell users on your splash screen or menu what the disc will do, and consider letting them choose instead, for example with a link on your HTML menu that opens or downloads the file.

To add a desktop shortcut instead of a copy, see copying a shortcut to the desktop.

Try it yourself. My AutoRun is free to download and fully functional - see how it handles this on your own USB drive or CD.
Download & Try Free

Go back to the FAQ for My AutoRun.

Questions? Talk to a real person.

RJL Software has built Windows software since 1994. Send us a message and we will get back to you.

Contact Us