10-22-2008 02:44 AM
I downloaded the windows_folder_path.vi from NI site, where I can see that "This VI is supported on Windows 2000, XP, and Vista."
If I use it in an executable that searches for Application Data folder, it works under XP, but it doesn't under a fresh Win 2000 SP4 installation.
A pop-up with the message:
Entry poin Not found
The procedure entry point SaferGetPolicyInformation could not be located in the dynamic link library ADVAPI32.dll
is shown.
When I press the OK button, another popup
LabVIEW: Resource not found.
An error occurred loading VI 'windows_folder_path.vi'.
LabVIEW load error code 3: Could not load front panel.
I'm confused because here (MSDN, Microsoft Developer Network) I can see that the SaferGetPolicyInformationfunction requires WinXP or Vista
Isn't this vi expected working properly under Win 2000?
In the next days I'll do the same test on a Vista machine, and I hope....
How can I get the Application Data path on WinXP, 2000 and Vista? With different languages OS this folder has a different name (Application Data, Dati Applicazioni, ...) so I can't build the path by myself.
I don't know if this helps, but I'm developing with LabVIEW 8.2.1and WinXP Pro
Solved! Go to Solution.
10-22-2008 03:06 AM
Hi there
Under XP there's a environment variable "APPDATA". Does this exist in VISTA and 2000? OK, this is not brilliant, but maybe you could call "SET APPDATA" with System Exec.vi and then parse the return string.
10-22-2008 03:09 AM - edited 10-22-2008 03:10 AM
Use the registry functions of LV to get direct access.
The folders for the current logged in user is under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, the value is AppData
The Fodlers for all users is under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, the value is Common AppData
10-22-2008 03:22 AM
Hi VIX,
i downloaded the same VI but there was no error in my system.
I am using WinXP pro and LV 8.5.1.
10-23-2008 04:20 AM