Guidance
指路人
g.yi.org
Software / Reginald / Examples / repository / Desktop Management / Basic Computer Information / Domain.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* Displays domain or workgroup information */
strcomputer = "."
objwmiservice = getobject("winmgmts:\\" || strcomputer || "\root\CIMV2")
colitems = objwmiservice~execquery("SELECT * FROM Win32_ComputerSystem")
DO objitem OVER colitems
	SAY "Computer Name:" objitem~name
	SAY "Name Format:" objitem~nameformat
	SAY "Domain:" objitem~domain
	SAY "Part Of Domain:" objitem~partofdomain /* post-Windows 2000 only */
	SAY "Workgroup:" objitem~workgroup /* post-Windows 2000 only */
	SELECT objitem~domainrole
		WHEN 0 THEN strdomainrole = "Standalone Workstation"
		WHEN 1 THEN strdomainrole = "Member Workstation"
		WHEN 2 THEN strdomainrole = "Standalone Server"
		WHEN 3 THEN strdomainrole = "Member Server"
		WHEN 4 THEN strdomainrole = "Backup Domain Controller"
		WHEN 5 THEN strdomainrole = "Primary Domain Controller"
	END
	SAY "Domain Role:" strdomainrole
	SAY "Roles:" objitem~roles
	SAY "Network Server Mode Enabled:" objitem~networkservermodeenabled
END
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2022-12-8  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:16