Does anyone know if the workgroup name exists in the registry anywhere? I was looking through the bundled Get/Set Computer Name tasks in the K2000. I thought it would help to spin off more tasks that preserve the workgroup/domain membership and computer description. The location of the computer name is pretty striaghtforward. But I cannot for the life of me find where Windows stores the workgroup name. So I was wondering:

  1. Does anyone know if/where the workgroup name exists in the registry?
  2. Is HKLM\System\ControlSet001\Services\LanmanServer\Parameters\srvcomment a reliable place to get the computer description?
  3. Is testing for the presence of HKLM\System\ControlSet001\Services\Tcpip\Parameters\Domain a reliable way to determine domain membership?
Answer Summary:
Workgroup name is stored in the Security hive (HKEY_LOCAL_MACHINE\Security) backed up by the file \windows\system32\config\security. It can only be accessed by privileged processes such as lsass. 2 and 3 are correct
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

2 and 3 are correct.  If the workgroup name is in the reistry it is not in plain text format.  I set mine with the answer file, but will see if I can locate where mine is hidden

Answered 02/20/2013 by: SMal.tmcc
Red Belt

Please log in to comment

Answers

1

Workgroup name is stored in the Security hive (HKEY_LOCAL_MACHINE\Security) backed up by the file \windows\system32\config\security. It can only be accessed by privileged processes such as lsass.

according to this link http://social.msdn.microsoft.com/Forums/en/embeddedwindowseefs/thread/c0d2bf00-2141-4d10-8e01-aa3804a2f7ec

 

Answered 02/20/2013 by: SMal.tmcc
Red Belt

  • Found it. It's at HKLM\Security\Policy\PolPrDmN. Unfortunately, it seems encoded slightly, and it's a REG_NONE type, which no convenient tools support.

    A quick google brings some AutoIt UDFs that might help. If that doesn't work, though. I might just give up.
Please log in to comment
0

Depending on what you are needing it for. In Powershell you can use this. This will output to a .txt file.

 

(Get-WmiObject -Class Win32_ComputerSystem).workgroup|out-file c:\temp\test.txt

 

You could also use a variable for further scripting. 

$workgroup= (Get-WmiObject -Class Win32_ComputerSystem).workgroup
Answered 02/20/2013 by: dugullett
Red Belt

  • Admittedly my Powershell skills aren't the best, but would that work as a PreInstallation task? Can you access WMI on a non-running Windows install? I started out with the registry mostly because accessing it offline is easy.
Please log in to comment
This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

0

If you are doing a scripted install or sysprep image add it to your answer file

<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Identification>
                <JoinWorkgroup>tmccacad</JoinWorkgroup>
            </Identification>
        </component>

Answered 02/21/2013 by: SMal.tmcc
Red Belt

  • Unattend.xml works beautifully when you know what that information will be beforehand, but it doesn't work so well when you don't. I didn't want to just specify a workgroup. I wanted to preserve whatever the workgroup settings were from the last installation on the target machine. I've already been able to preserve the name--Dell even provided sample scripts to do just that. I just wanted to try doing that with the workgroup as well.
Please log in to comment
Answer this question or Comment on this question for clarity