10-05-2017 02:20 PM
Hello There,
I often run into a problem while CVI was almost done compiling my project and at the final linking stage, the program responded "Failed to copy (the exe file). File access permission denied. Build failed." Sometimes, I can just exit CVI program then re-launch CVI to get a successful build. Other times, I will need to re-boot my Windows and re-launch CVI to make this work.
I am running LabWindows CVI 2015 on Windows 10 on a Dell XPS9360 laptop with SSD and file index off. I also found out that when this issue happens, even after exiting CVI program, I could not delete the exe file in question from Windows either.
Problem seems similar to this old thread?
https://forums.ni.com/t5/LabWindows-CVI/File-access-permission-denied/m-p/3698500
Any help is very much appreciated!
10-06-2017 09:47 AM
See if anything else has the file open. You can do this using Handle or ProcExplorer.
10-11-2017 06:26 PM
Thanks for the recommendation.
Just had another "File access denied" occurrence while linking, and I used ProcessExplorer to see that cvi.exe, cvidebug.exe, and explorer.exe have records of using the exe file. Once I exited CVI, it became cleared. And ProcessExplorer shows explorer.exe has two records on the project directory (not the exe file).
This time, relaunching CVI did not fixed the problem. I then tried to delete the exe file from Windows and it prompted "permission denied and need to be administrator" though I am an administrator. The exe file still showed up in file explorer. At this stage, I proceeded to reboot Windows. Upon new Windows session, I found the exe file was gone.
This smells like CVI and Windows OS have some occasional confusion regarding file status...
10-12-2017 09:33 AM
If you check Windows event viewer, do you see any events around the time of the error? Windows will often log Event 1005 for issues like this with more detail on the underlying win32 error. Sometimes you can run Chkdsk and fix these issues, but it can also indicate a hardware problem.
Hope this helps,
Trent
10-25-2017 01:41 PM
Pardon my delayed reply, and thank you for your recommendation. I will keep the event viewer idea in mind when next error occurs. Being busy with this project and is using a work around to avoid the problem by removing the exe file from Windows before CVI builds.
06-29-2021 03:56 AM
I have the same problem. Is there any solution?