Windows cannot access the specified device, path or file error


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

Problem

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.

Solution

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 Jeremy Kadlec is the Co-Founder, Editor and Author at MSSQLTips.com, CTO @ Edgewood Solutions and a six time SQL Server MVP.

View all my tips
Related Resources





Comments For This Article




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

 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
Solution:
    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         

"http://answers.yahoo.com/question/index?qid=20080619095356AAUnB3m"
    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 (971)

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.



download


Recommended Reading

Enabling xp_cmdshell in SQL Server

Encrypting passwords for use with Python and SQL Server

Steps to Drop an Orphan SQL Server User when it owns a Schema or Role

Is your SQL Server environment ready for GDPR?

Understanding SQL Server fixed database roles





get free sql tips
agree to terms


Learn more about SQL Server tools