LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Windows Folder Paths on Win 2000

Solved!
Go to solution

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

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 5
(3,769 Views)

 

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.

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 2 of 5
(3,765 Views)
Solution
Accepted by topic author vix

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

Message Edited by waldemar.hersacher on 10-22-2008 10:10 AM
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 3 of 5
(3,764 Views)

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. 

Regards
Aks

(Appreciate answers by giving KUDOS)
Hit the stars.............. sky is not the limit.
0 Kudos
Message 4 of 5
(3,756 Views)

Have a look also to this forum post and this, maybe they could be useful to you to retrieve OS folder Path.

Bye!

Licia

 

0 Kudos
Message 5 of 5
(3,719 Views)