Alex
Alex

Reputation: 1398

Windows XP Application Data Folder?

I'm trying to access Windows XP's Application Data - but I'm having a slight issue, I am using the following code:

 Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

This is working correctly in any other opperating system - but Windows XP - On Windows XP it directs them to: C:\Documents and Settings\Administrator\Application Data - this is not the folder I want.

I want to access: C:\Documents and Settings\Administrator\Local Settings\Application Data

I have tried to do:

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\..\Local Settings\Application Data - but I am getting .NET 'File Not Found' Errors.

What should I do? Please and Thank You!

Upvotes: 3

Views: 5907

Answers (3)

Simon
Simon

Reputation: 1221

Try using the Environment.SpecialFolder.LocalApplicationData.

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)

Upvotes: 3

drew010
drew010

Reputation: 69937

I think what you are looking for on XP is Environment.SpecialFolder.LocalApplicationData.

Upvotes: 7

Robert
Robert

Reputation: 3074

remove the "\.." Try this:

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Local  Settings\Application Data

Upvotes: -1

Related Questions