Special Directories...Default Behavior

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
Okay,

Well, there is of course the FileIO.SpecialDirectories shared class, whatever, and you can point it to CurrentUserApplicationData or AllUserApplicationData (maybe misspelled).
But When I grab them, guess what? They aren't the 'Application Data' Folder, they are ApplicationData\MyCompany\MyApplication\AppVersion\

How can I eradicate this behavior?

Primarily I don't want the Version involved in my AppData Folders, and second I don't really care for VB going about making folders unless I ask for them...
Case and Point, I asked for Alluser App Data and there is a folder in both the all user and the Current User App Data folders. I didn't tell VB to create either one, I just asked for the location of one, expecting to receive \Docs & Settings\All Users\Application Data

Is there a way to ask for that folder (the Root Special folder as selectable in the FolderBrowseDialog) not some VB concoction I didn't ask for?

Thanks
 
I always use:
VB.NET:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

I never have a need to use the AllUser's AppData path
 
What's the folder structure it's creating? The only folder structure that I'm seeing is what Windows (xp, 2003 and vista) creates for every user on the comp
 
AllUserApplicationData is the app data path for all users of your application. \Docs & Settings\All Users\Application Data has nothing to do with your application as such.
Primarily I don't want the Version involved in my AppData Folders, and second I don't really care for VB going about making folders
That is how .Net is designed.
 
Ahh.

So no matter what, when a user logged onto the computer runs my application, there will always be a created folder:

Documents And Settings\User\Application Data\MyCompany\Application\Version

And there is no way to turn that off?

*sigh*

Oh well.

Thanks Anyway
 
VB.NET:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
returns this path:
VB.NET:
C:\Documents and Settings\ADINTERN\Application Data
There isn't a "\MyCompany\Application\Version" in the path at all

I should also note that this is for .Net 2.0 and since .Net 3.5 is built on top of .Net 2.0, I don't see how VS 2008 would handle it differently from VS 2005 using the Environment namespace

Edit: I just tested this is VB 2008 Express and Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) returned the same path
 
Back
Top