Acesso ao ambiente
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Linq
Module Ambiente
Public Function Ambiente() As List(Of String)
Dim a As New List(Of String)
a.Clear()
'drives de disco
a.Add("Discos : ")
For Each drive As String In Environment.GetLogicalDrives()
a.Add(" Drive : " + drive)
a.Add(" ")
Next
'Versão do sistema operacional
a.Add("OS : " + Environment.OSVersion.ToString)
'número de processadores
a.Add("Número de Processadores : " + Environment.ProcessorCount)
'Versão do .NET
a.Add("Versão .NET : " + Environment.Version.ToString)
'exibe ou define o código de término do programa
Environment.ExitCode = 0 'sucesso
Environment.ExitCode = -1 'falha
'nome da maquina
a.Add("Nome da máquina : " + Environment.MachineName)
'pilha do aplicativo
'a.Add("Pilha do aplicativo : " + Environment.StackTrace)
'Diretório do sistema
a.Add("Diretório do sistema : " + Environment.SystemDirectory)
'Nova Linha
a.Add("Nova Linha : " + Environment.NewLine)
'nome do usuário logado
a.Add("nome do usuário logado : " + Environment.UserName)
'dominio
a.Add("nome do usuário logado : " + Environment.UserDomainName)
'diretório corrente
a.Add("nome do usuário logado : " + Environment.CurrentDirectory)
'pasta default do usuário
a.Add("Pasta default do usuário : " + Environment.GetFolderPath(0))
'Sistema operacional de 64 bits ?
a.Add("Sistema operacional de 64 bits ? : " + Environment.Is64BitOperatingSystem)
'O proccesso é de 64 bits
a.Add("O processo é de 64 bits ? : " + Environment.Is64BitProcess)
'Pastas especiais
a.Add("Pastas especiais ")
a.Add(" AdminTools:" + Environment.SpecialFolder.AdminTools)
a.Add(" ApplicationData:" + Environment.SpecialFolder.ApplicationData)
a.Add(" CDBurning:" + Environment.SpecialFolder.CDBurning)
a.Add(" CommonAdminTools:" + Environment.SpecialFolder.CommonAdminTools)
a.Add(" CommonDesktopDirectory:" + Environment.SpecialFolder.CommonDesktopDirectory)
a.Add(" CommonDocuments:" + Environment.SpecialFolder.CommonDocuments)
a.Add(" CommonMusic:" + Environment.SpecialFolder.CommonMusic)
a.Add(" CommonOemLinks:" + Environment.SpecialFolder.CommonOemLinks)
a.Add(" CommonPictures:" + Environment.SpecialFolder.CommonPictures)
a.Add(" CommonProgramFiles:" + Environment.SpecialFolder.CommonProgramFiles)
a.Add(" CommonProgramFilesX86:" + Environment.SpecialFolder.CommonProgramFilesX86)
a.Add(" CommonPrograms:" + Environment.SpecialFolder.CommonPrograms)
a.Add(" CommonStartMenu:" + Environment.SpecialFolder.CommonStartMenu)
a.Add(" CommonStartup:" + Environment.SpecialFolder.CommonStartup)
a.Add(" CommonTemplates:" + Environment.SpecialFolder.CommonTemplates)
a.Add(" CommonVideos:" + Environment.SpecialFolder.CommonVideos)
a.Add(" Cookies:" + Environment.SpecialFolder.Cookies)
a.Add(" Desktop:" + Environment.SpecialFolder.Desktop)
a.Add(" DesktopDirectory:" + Environment.SpecialFolder.DesktopDirectory)
a.Add(" Favorites:" + Environment.SpecialFolder.Favorites)
a.Add(" Fonts:" + Environment.SpecialFolder.Fonts)
a.Add(" History:" + Environment.SpecialFolder.History)
a.Add(" InternetCache:" + Environment.SpecialFolder.InternetCache)
a.Add(" LocalApplicationData:" + Environment.SpecialFolder.LocalApplicationData)
a.Add(" LocalizedResources:" + Environment.SpecialFolder.LocalizedResources)
a.Add(" MyComputer:" + Environment.SpecialFolder.MyComputer)
a.Add(" MyDocuments:" + Environment.SpecialFolder.MyDocuments)
a.Add(" MyMusic:" + Environment.SpecialFolder.MyMusic)
a.Add(" MyPictures:" + Environment.SpecialFolder.MyPictures)
a.Add(" MyVideos:" + Environment.SpecialFolder.MyVideos)
a.Add(" NetworkShortcuts:" + Environment.SpecialFolder.NetworkShortcuts)
a.Add(" Personal:" + Environment.SpecialFolder.Personal)
a.Add(" PrinterShortcuts:" + Environment.SpecialFolder.PrinterShortcuts)
a.Add(" ProgramFiles:" + Environment.SpecialFolder.ProgramFiles)
a.Add(" ProgramFilesX86:" + Environment.SpecialFolder.ProgramFilesX86)
a.Add(" Programs:" + Environment.SpecialFolder.Programs)
a.Add(" Recent:" + Environment.SpecialFolder.Recent)
a.Add(" Resources:" + Environment.SpecialFolder.Resources)
a.Add(" SendTo:" + Environment.SpecialFolder.SendTo)
a.Add(" StartMenu:" + Environment.SpecialFolder.StartMenu)
a.Add(" Startup:" + Environment.SpecialFolder.Startup)
a.Add(" System:" + Environment.SpecialFolder.System)
a.Add(" SystemX86:" + Environment.SpecialFolder.SystemX86)
a.Add(" Templates:" + Environment.SpecialFolder.Templates)
a.Add(" UserProfile:" + Environment.SpecialFolder.UserProfile)
a.Add(" Windows:" + Environment.SpecialFolder.Windows)
a.Add(Environment.CurrentDirectory)
a.Add(Environment.GetFolderPath("Desktop"))
a.Add(Environment.SpecialFolder.AdminTools)
a.Add(Environment.SpecialFolder.ApplicationData)
a.Add(Environment.SpecialFolder.CDBurning)
a.Add(Environment.SpecialFolder.CommonAdminTools)
a.Add(Environment.SpecialFolder.CommonApplicationData)
a.Add(Environment.SpecialFolder.CommonDesktopDirectory)
a.Add(Environment.SpecialFolder.CommonDocuments)
a.Add(Environment.SpecialFolder.CommonMusic)
a.Add(Environment.SpecialFolder.CommonOemLinks)
a.Add(Environment.SpecialFolder.CommonPictures)
a.Add(Environment.SpecialFolder.CommonProgramFiles)
a.Add(Environment.SpecialFolder.CommonProgramFilesX86)
a.Add(Environment.SpecialFolder.CommonPrograms)
a.Add(Environment.SpecialFolder.CommonStartMenu)
a.Add(Environment.SpecialFolder.CommonStartup)
a.Add(Environment.SpecialFolder.CommonTemplates)
a.Add(Environment.SpecialFolder.CommonVideos)
a.Add(Environment.SpecialFolder.Cookies)
a.Add(Environment.SpecialFolder.Desktop)
a.Add(Environment.SpecialFolder.DesktopDirectory)
a.Add(Environment.SpecialFolder.Favorites)
a.Add(Environment.SpecialFolder.Fonts)
a.Add(Environment.SpecialFolder.History)
a.Add(Environment.SpecialFolder.InternetCache)
a.Add(Environment.SpecialFolder.LocalApplicationData)
a.Add(Environment.SpecialFolder.LocalizedResources)
a.Add(Environment.SpecialFolder.MyComputer)
a.Add(Environment.SpecialFolder.MyDocuments)
a.Add(Environment.SpecialFolder.MyMusic)
a.Add(Environment.SpecialFolder.MyPictures)
a.Add(Environment.SpecialFolder.MyVideos)
a.Add(Environment.SpecialFolder.NetworkShortcuts)
a.Add(Environment.SpecialFolder.Personal)
a.Add(Environment.SpecialFolder.PrinterShortcuts)
a.Add(Environment.SpecialFolder.ProgramFiles)
a.Add(Environment.SpecialFolder.ProgramFilesX86)
a.Add(Environment.SpecialFolder.Programs)
a.Add(Environment.SpecialFolder.Recent)
a.Add(Environment.SpecialFolder.Resources)
a.Add(Environment.SpecialFolder.SendTo)
a.Add(Environment.SpecialFolder.StartMenu)
a.Add(Environment.SpecialFolder.Startup)
a.Add(Environment.SpecialFolder.System)
a.Add(Environment.SpecialFolder.SystemX86)
a.Add(Environment.SpecialFolder.Templates)
a.Add(Environment.SpecialFolder.UserProfile)
a.Add(Environment.SpecialFolder.Windows)
a.Add(Environment.SystemDirectory())
a.Add(Environment.GetFolderPath(Environment.SpecialFolder.Desktop))
Return a
End Function
End Module