title: How create a batch to change the Workgroup?
body: <p>I have a batch file that changes the name of the computer. Now I also want to change the Workgroup. How can I add this to the <code>.batch?</code></p>
  
  <p>This is what I have now, for changing the computer name:</p>
  
  <pre><code>@echo off
  SET /P PCNAME=Please enter your desired PC name:
  REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName /t REG_SZ /d %PCNAME% /f
  </code></pre>
  
  <p>Only now I need the same for the Workgroupname.</p>