木子屋 Dnawo's BLOG

使用Environment类获取服务器信息

👤 dnawo 📅 2008-07-08 👁 5192 👍 0 💬 0 🔄 本站原创
工作目录: Environment.CurrentDirectory
系统目录: Environment.SystemDirectory
当前目录: Server.MapPath(".")
计算机名称: Environment.MachineName
系统版本号: Environment.OSVersion.ToString()
处理器个数: Environment.ProcessorCount
系统启动时间(h): Environment.TickCount/3600000
网络域名: Environment.UserDomainName
当前用户: Environment.UserName
占用内存(k): Environment.WorkingSet/1024
分区个数: Environment.GetLogicalDrives().Length


Desktop: Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Programs: Environment.GetFolderPath(Environment.SpecialFolder.Programs)
Personal: Environment.GetFolderPath(Environment.SpecialFolder.Personal)
MyDocuments: Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Favorites: Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
Startup: Environment.GetFolderPath(Environment.SpecialFolder.Startup)
Recent: Environment.GetFolderPath(Environment.SpecialFolder.Recent)
SendTo: Environment.GetFolderPath(Environment.SpecialFolder.SendTo)
StartMenu: Environment.GetFolderPath(Environment.SpecialFolder.StartMenu)
MyMusic: Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)
DesktopDirectory: Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
MyComputer: Environment.GetFolderPath(Environment.SpecialFolder.MyComputer)
Templates: Environment.GetFolderPath(Environment.SpecialFolder.Templates)
ApplicationData: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
LocalApplicationData: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
InternetCache: Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)
Cookies: Environment.GetFolderPath(Environment.SpecialFolder.Cookies)
History: Environment.GetFolderPath(Environment.SpecialFolder.History)
CommonApplicationData: Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
System: Environment.GetFolderPath(Environment.SpecialFolder.System)
ProgramFiles: Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
MyPictures: Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)
CommonProgramFiles: Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles)

评论(0)

暂无评论。

计算题
评论需审核通过后显示
← 上一篇 J2ME内存占用详解及优化方法 下一篇 → 手机发送代码投放参考之帝国网站管理系统