ADO DOT NET Posted February 24, 2008 Posted February 24, 2008 Hello, 1. In which Windows versions "Application Data" path is available? 2. In Windows versions that do not have this path, what should I do? Thanks :) Quote
Administrators PlausiblyDamp Posted February 24, 2008 Administrators Posted February 24, 2008 1. Potentially none, this could be move to another location even for the OS' that use it by default. 2. You should always use Environment.GetSpecialFolder(...) to find this kind of thing e.g. Dim s As String s = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) 'or s = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) should get you the path you are after. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ADO DOT NET Posted February 24, 2008 Author Posted February 24, 2008 Hi, Thanks for your help. However, I am working in VB6. This will work even in Windows 98 and ME? Thanks. Quote
Administrators PlausiblyDamp Posted February 24, 2008 Administrators Posted February 24, 2008 The code I posted was for vb.net, http://support.microsoft.com/kb/252652 has a link for doing the same in VB6. Either way will work on 98 / ME though. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ADO DOT NET Posted February 24, 2008 Author Posted February 24, 2008 (edited) Pleaseee! Help me! :( That code works fine, but returns: C:\Documents and Settings\User\Local Settings\Application Data - I wanna get: C:\Documents and Settings\User\Application Data - So I changed: CSIDL_LOCAL_APPDATA to: CSIDL_APPDATA But I get error: CSIDL_APPDATA : Variable not found! Why this occurs?:( Edited February 24, 2008 by ADO DOT NET Quote
Administrators PlausiblyDamp Posted February 24, 2008 Administrators Posted February 24, 2008 You will probably need to declare the CSIDL_APPDATA constant try Private Const CSIDL_LOCAL_APPDATA = &H1A& Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.