/build/static/layout/Breadcrumb_cap_w.png

Collect and Inject Workgroup name (and Computer Description)

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?

0 Comments   [ + ] Show comments

Answers (4)

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
Posted by: SMal.tmcc 11 years ago
Red Belt
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

Posted by: SMal.tmcc 11 years ago
Red Belt
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

 


Comments:
  • 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. - rodoke 11 years ago
Posted by: dugullett 11 years ago
Red Belt
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

Comments:
  • 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. - rodoke 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
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>


Comments:
  • 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. - rodoke 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ