Hello all together,
First of all I'm sorry for my bad English.
At the moment I try to collect many information about some system in our network, which are not or maybe not in our Domain.
No problem to get info like ComputerName and WindowsVerion ect.
But I don't find a sexy way to get DomainName or WorkgroupName with a WinBatch function.
Of course it possible to use the environment "USERDOMAIN" but I don't know how it work if the computer is not in a domain.
Thaks for help
Beat
There are a few caveats but take a look at the following brief article:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Determine~if~Computer~is~in~a~Workgroup~or~Domain.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Determine~if~Computer~is~in~a~Workgroup~or~Domain.txt)
For what it is worth, "USERDOMAIN" is normally set to the computer's name on Workgroup computers.