LabVIEW VI Cannot Find Files in All Users Folders After Windows XP Re-install
Primary Software Version: 8.2.1
Primary Software Fixed Version: N/A
Secondary Software: N/A
I have recently re-installed Windows XP without reformatting the disk. In my application I have been writing in LabVIEW, I query a folder located in the All Users folder (usually a path such as C:\Documents and Settings\All Users) such as in the Shared Documents or Application Data sub-folders. Now I am receiving a File Not Found error. Why is this happening and how can I prevent it?
When Windows XP is re-installed over an existing partition without the disk being fully formatted, Windows attempts to save your user files by creating a new folder for your new data called All Users.WINDOWS (C:\Documents and Settings\All Users.Windows). If you have hard-coded the path to a file within the LabVIEW application, the call to the file path will now fail.
The solution is to dynamically query Windows in your application to find out what the Public folder is now called. Use the Get System Directory VI to return the appropriate path. In the VI snippet below, the Get System Directory VI returns the path to the Shared Documents folder within All Users.
KnowledgeBase 3DNI22CC: Why do I get Error 6: Generic File I/O Error when using the Copy VI?
Report Date: 11/23/2009
Last Updated: 02/17/2010
Document ID: 53MEE2V7