Learn more about SQL Server tools

mssqltips logo

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Scripts          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories


Windows cannot access the specified device, path or file error

By:   |   Last Updated: 2007-06-11   |   Comments (2)   |   Related Tips: More > Security

Every time I try to execute an executable (*.exe) file that I copied from a Windows 2003 File Server to my SQL Server running Windows 2003, I am unable to access the file.  It works without a problem on the original Windows 2003 File Server and I am able to validate that nothing has changed.  I just keep getting this error message - Windows cannot access the specified device, path or file.  How can I resolve this issue?  What am I doing wrong?  I am just copying a file to my SQL Server.

In Windows 2003 when you copy an executable (*.exe) file, the file now has a blocked property.  This is a security feature that can easily be resolved by reviewing the file properties and clicking the 'Unblock' button to disable the security feature.  In the first image below the 'Unblock' button is present with the text of - 'This file came from another computer and might be blocked to help protect this computer'.  Once you click the 'Unblock' button you can now access and run the executable (*.exe) file.  In addition, the 'Unblock' button and text disappear as shown in the second image.

Original File Properties Window


Updated File Properties Window


Next Steps

  • Just be aware of this feature in Windows 2003 and be sure to unblock the executable (*.exe) files when needed.
  • If you are copying files as a portion of an automated SQL Server process be sure to test the process thoroughly to ensure the file has not been blocked due to security restrictions.
  • For additional security related tips, check out the MSSQLTips.com security category.

Last Updated: 2007-06-11

get scripts

next tip button

About the author
MSSQLTips author Jeremy Kadlec Since 2002, Jeremy Kadlec has delivered value to the global SQL Server community as an MSSQLTips.com co-founder and Edgewood Solutions SQL Server Consultant.

View all my tips
Related Resources

Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 

Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.


Saturday, August 09, 2008 - 9:04:22 AM - Sultan Back To Top

 1. It all started after installing AVG 7.00 Free in my BASIS [email protected] on the 6h August 2008

2. The symptoms were:
    a) No EXE runs except explorer, notepad, windows management files, command window
    b) Does not boot in safe mode, rather restarts
    c) When clicks on an EXE it gives the message "Windows cannot access the specified device, path or file. You May not     

    have the appropriate permission"
    d) Network card is dis-connected
    e) Windows firewall is on and never goes off
    f) Some viruses are active
    a) I first started to delete the virus files
    b) Visited forum after forums but could not find match for my problem
    c) I Fixed the firewall by restoring default from advanced tab. Try this         

    d) The biggest point is to delete all the avg .exe files. One .dll was not removing. I had to go to registry and     

    remove all its references and problem was solved. All the EXE files are running now normally.

    I am now in search of the reason that AVG blocks an EXE.

Sunday, May 11, 2008 - 10:31:54 PM - belong Back To Top

Thank you for such an explicit answer. I have carried out the above procedure and the text and "unblock" have disappeared from the properties /general menu. I am  running Windows XP and am Administrator user trying to run exe. file for AVG 75 free download to install it. I still get the "Windows cannot access" notice. Tried restart but no joy and properties still has "unblocked" and text removed.

Learn more about SQL Server tools