失落城堡 获取服务器信息,使用Environment类获取服务器信息

使用Environment类获取服务器信息

编辑:dnawo 日期:2008-07-08

字体大小: 小 中 大

be1af1963f4d4760479112dc4a9a30e4.gif

7277bce73b22c14503645e4189aef4d2.gif

05dfe00391f02dfb2cb52b484c61ada0.gif

工作目录: 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 | 引用: 0 | 查看次数: 3684

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值