problem in vista

quioske

Active member
Joined
Feb 25, 2008
Messages
27
Programming Experience
1-3
Hi i have developed an application in vb.net

i am creating directories at runtime in c:\programfiles\

it is possible in Windows XP.

But in vista, it is creating a problem.

it is not creating a directory.

i think it is problem of permissions.

does any one knows how to set permissions to a folder in Vista

to create directory and file under that folder.
 
Yes, use the user's "Application Data" folder instead.

In Windows Vista your program's not allowed (at all) to make or change any files in the program files folder.

Some XP machines are configured to work this way too, which MS should have enforced for XP but they didn't, however, they are enforcing this for Vista and should be in future OS's.

To get the user's Application Data folder (AppData in Vista) use this:
VB.NET:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & IO.Path.DirectorySeparatorChar
 
Back
Top