# Sysprep functions (OSD)

> OSD Scripting functions to create and manipulate settings in Windows MiniSetup answer files (sysprep.inf and unattend.xml).

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

The sysprep category contains functions to create and manipulate settings in the Windows MiniSetup answer files.  
These functions work transparently on both sysprep.inf and unattend.xml, giving a uniform way for setting values regardless of operating system version.

## Unattend Files

| UNATTEND FILE   | OPERATING SYSTEMS                                                       | FILE LOCATION       |
|:----------------|:------------------------------------------------------------------------|:--------------------|
| Unattend.xml    | Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008R2 | C:\Windows\Panther\ |
| Sysprep.inf     | Windows 2000, Windows XP, Windows Server 2003, Windows Server 2003 R2   | C:\Sysprep\         |

## Remarks

When working with unattend.xml, the unattend.xml file must exist, and the root component tags must exist as shown in the example below. All elements in the components tag will be inserted or deleted by the functions.

## Example

**XML**

```xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-UnattendedJoin" ...>
        </component>
    </settings>
</unattend>

```

## In this section

- [Sysprep_AddRunCommand](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-addruncommand/)
- [Sysprep_JoinDomain](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-joindomain/)
- [Sysprep_JoinWorkgroup](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-joinworkgroup/)
- [Sysprep_SetLocalAdminPassword](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-setlocaladminpassword/)
- [Sysprep_SetOrganizationName](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-setorganizationname/)
- [Sysprep_SetProductKey](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-setproductkey/)
- [Sysprep_SetRegisteredOwner](/capainstaller/vb-scripting-library/osd-scripting-library/sysprep-functions-osd/sysprep-setregisteredowner/)
