My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData Property
Gets a path name pointing to the application's data in the \Documents and Setting\All Users\ApplicationData directory.
' Usage
Dim value As String = My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData
' Declaration
Public ReadOnly Property AllUsersApplicationData As String
Return Value
String.
Exceptions
The following condition may cause an exception:
- The path is empty, usually because the operating system does not support the directory (DirectoryNotFoundException).
Remarks
The My.Computer.FileSystem.SpecialDirectories Object contains paths to commonly referenced directories.
Example
This example displays the path for the AllUsersApplicationData directory in a MessageBox.
MsgBox _
(My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData)
Requirements
Namespace: Microsoft.VisualBasic.MyServices
Class: SpecialDirectoriesProxy (provides access to SpecialDirectories)
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Project type | Available |
---|---|
Windows Application |
Yes |
Class Library |
Yes |
Console Application |
Yes |
Windows Control Library |
Yes |
Web Control Library |
Yes |
Windows Service |
Yes |
Web Site |
Yes |
Permissions
The following permission may be necessary:
Permission | Description |
---|---|
Controls the ability to access files and folders. Associated enumeration: Unrestricted. |
For more information, see Code Access Security and Requesting Permissions.
See Also
Reference
My.Computer.FileSystem.SpecialDirectories Object
Microsoft.VisualBasic.FileIO.SpecialDirectories.AllUsersApplicationData