LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

File access denied while linking

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!

0 Kudos
Message 1 of 6
(3,310 Views)

See if anything else has the file open. You can do this using Handle or ProcExplorer.

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 6
(3,271 Views)

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...

0 Kudos
Message 3 of 6
(3,251 Views)

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


https://www.linkedin.com/in/trentweaver
Message 4 of 6
(3,233 Views)

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.

0 Kudos
Message 5 of 6
(3,180 Views)

I have the same problem. Is there any solution?

0 Kudos
Message 6 of 6
(1,693 Views)