Does Wise have the ability to check for a Domain?
Submitted by efmtech on 2 September, 2008 - 15:51.
I have been asked to find out if Wise could check to see if the computer is on our company domain before installing. If the computer is on the domain then let the installation continue without any probelms..
I have been thinking of using a script for this but find myself a little lost since I am new to Wise.
Can you guys point me into the right direction please.
Thanks, Elliott




Checking if you are in a domain
It is easy to check if your computer is in the company domain. All you have to do is pull a registry key and compare it to your domain name:
You would use the Get Registry Key Value in your script editor.
In Wise 7 you can also create a VB script to pull the domain name:
VB Script:
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_ComputerSystem",,48) For Each objItem in colItems Wscript.Echo "--------------------------------" Wscript.Echo "Win32_ComputerSystem instance" Wscript.Echo "--------------------------------" Wscript.Echo "Domain: " & objItem.Domain 'Here is where you set the variable "varDomain" SetVariable "varDomain", objItem.Domain Next