This tutorial shows you how to create automaticaly
  1. Extract the opsi-win7 package in OPSI-Workbench
  2. CD into the OPSI folder an change the control file
  3. Add a Product Property for the LocalPassword (You can also user a hostparameter instead of product property, then you don't need to create a “new” OPSI package )
  4. 
    [ProductProperty]
    type: unicode
    name: localpw
    multivalue: False
    editable: True
    description: LocalAdmin Passwort
    values: ["DefaultPass"]
    default: ["DefaultPass"]
  5. go back into the source directory of your Opsi-Package and use opsi-makeproductfile
  6. Install the modified opsi package with opsi-package-manager -i
  7. Change into \opst\pcbin\install\win7\custom\ dir
  8. Modify the unattend.xml if there are no unattend.xml, copy the unattended.xml.template form the opsi directory into the custom directory (and rename to unattend.xml)
  9. Use the LocalAccounts section (Line 288)
  10.  <!--
    <LocalAccount wcm:action="add">
    <Password>
    <PlainText>true</PlainText>
    <Value>#@localpw*#</Value>
    </Password>
    <Description>BESCHREIBUNG</Description>
    <Group>Administratoren</Group>
    <Name>USERNAME</Name>
    <DisplayName>DISPLAYNAME</DisplayName>
    </LocalAccount>
    --> 
  11. Remove the <!– and –>
  12. Add your User information (username, Description …..)
  13. For adding password via OpsiConfiguration Interface add the Productproperty localpw into the password sektion like this: #@localpw*# . localpw is the name of the Productproperty you have created in the control file, patcha will patch the XML file with your own values. You can also use a hostparameter instead of product property.