> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Script authoring tool

> Script authoring tool

Use this tool to quickly create new unattended setup scripts for XBOX One Development Kits by choosing from a wide selection of predefined actions. The script authoring tool is available both in [XBOX Device Portal (Windows Device Portal on XBOX)](/tools/tools-console/wdp/wdp), as shown in figure 1, and in [XBOX Manager](/tools/tools-console/xbom/xbom).

**Figure 1.  Main interface of the script authoring tool in XBOX Device Portal**

<img src="https://mintcdn.com/microsoft-4404708b/6TXzXmujKayly5Sf/images/gdk/tools/script_authoring_tool_full.png?fit=max&auto=format&n=6TXzXmujKayly5Sf&q=85&s=efebc9087edc659670808ef5614b4e5a" alt="Screenshot of the main interface of the script authoring tool in XBOX Device Portal" width="1080" height="1280" data-path="images/gdk/tools/script_authoring_tool_full.png" />

This topic contains the following sections.

* [Open the script authoring tool](#open_tool)
* [Create a new script](#create_script)
* [Add, edit, and reorder script actions](#add_actions)
* [Export and import scripts](#save_script)
* [Deploy and clear a boot script](#deploy_script)
* [Cancel a boot script](#abort_script)
* [Invoke scripts from the XBOX One X dev kit front panel](#front_panel)

<a id="open_tool" />

## Open the script authoring tool

The script authoring tool is included in [XBOX Device Portal (Windows Device Portal on XBOX)](/tools/tools-console/wdp/wdp) and is hosted in [XBOX Manager](/tools/tools-console/xbom/xbom). To open the tool in XBOX Device Portal, go to the **Automation** workspace on the left pane as shown in figure 2.

**Figure 2.  Workspaces in XBOX Device Portal**

<img src="https://mintcdn.com/microsoft-4404708b/6TXzXmujKayly5Sf/images/gdk/tools/script_authoring_tool_workspaces.png?fit=max&auto=format&n=6TXzXmujKayly5Sf&q=85&s=027aaad669b0a2edf7cd8ef66c99f934" alt="Screenshot of workspaces in XBOX Device Portal" width="244" height="454" data-path="images/gdk/tools/script_authoring_tool_workspaces.png" />

If you can't find the Automation workspace, add the automation tools to a new workspace by using the following steps.

1. Select **Menu** on the upper-left corner, and then select **New workspace**.
2. Enter a name for the new workspace, and then select **Add**.
3. On the new workspace, select **Menu**, and then select **Add tools to workspace**.
4. On the tools list, select **XBOX automation** and **XBOX unattended settings**, and then select **Add**.

<a id="create_script" />

## Create a new script

If you're already working on a script, consider either exporting or deploying the script that you're working on *before* you select **New script**.

To create a new script, select **New script** under **Automation** or your custom workspace. This clears the current script and resets **Script Name** to "New Script".

> <img src="https://mintcdn.com/microsoft-4404708b/z-rLYkO3Ax6HPtgm/images/gdk/tools/caution.gif?s=c35e42b8bb5ca0bdac12d10f6c467c29" alt="caution" width="11" height="11" data-path="images/gdk/tools/caution.gif" />**CAUTION:** When you go to a different XBOX Device Portal workspace, it has the same effect as selecting **New script**. To avoid losing your work, open your new workspace in a new browser tab.

<a id="add_actions" />

## Add, edit, and reorder script actions

Script actions are individual automation tasks that you can combine to create a script. .

The script editor maintains a table of actions that you've added. This table is blank in a newly created script. As you add new actions, new lines are added to the table as shown in figure 3.

**Figure 3.  Actions table in the script authoring tool**

<img src="https://mintcdn.com/microsoft-4404708b/6TXzXmujKayly5Sf/images/gdk/tools/script_authoring_tool_action_table.png?fit=max&auto=format&n=6TXzXmujKayly5Sf&q=85&s=a1bb4117498919672d24a64c2866943f" alt="Screenshot of the actions table in the script authoring tool " width="882" height="234" data-path="images/gdk/tools/script_authoring_tool_action_table.png" />

To add a new action to a script, select **New action**. This shows the New action dialog box, which contains categorized lists of dozens of scriptable tasks and settings that you can add to your script. To do so, choose a category, select the action that you want from the list, and then select **Next** to finish adding the action to your script as shown in figure 4.

**Figure 4.  New action dialog box in the script authoring tool**

<img src="https://mintcdn.com/microsoft-4404708b/6TXzXmujKayly5Sf/images/gdk/tools/script_authoring_tool_new_action.png?fit=max&auto=format&n=6TXzXmujKayly5Sf&q=85&s=88bbcd6d04a80cbfecce476991526425" alt="Screenshot of the New action dialog box in the script authoring tool" width="570" height="459" data-path="images/gdk/tools/script_authoring_tool_new_action.png" />

To edit an existing action, select the name of that action in the table. After you create a script with several actions, you can change the order in which the actions are run by selecting the **move up** or **move down** link in the **Actions** column. To delete an action, select the **delete** link in the **Actions** column as shown in figure 3.

<a id="save_script" />

## Export and import scripts

To save your script, select **Export**, and then save the script by using the standard file dialog box. The script is saved in a text file named "*scriptname*.xboxunattend". (Note that the Export button isn't available if the script doesn't contain any actions.) Saved scripts can be imported and deployed later to another console or a USB drive.

To edit previously exported scripts, import them into the script authoring tool. To import a script, select **Import**, and then browse to the .xboxunattend file that contains the script.

<a id="deploy_script" />

## Deploy and clear a boot script

To automatically run a script every time you restart your dev kit, import the script into the tool, and then select **Apply as boot script**. This copies the script to a command script named *xd:\boot\boot.cmd* on your dev kit. Every time that your dev kit restarts, it opens either [Developer Home on the console (Dev Home)](/tools/tools-console/devhome/devhome) (the default for dev kits) or the retail Home screen, depending on the preferences you've selected, and then runs your boot script about 20-30 seconds later.

To remove the current boot script from the console, select **Clear stored script**. This button is available whenever XBOX Device Portal is connected to a console that has a boot script deployed.

<a id="abort_script" />

## Cancel a boot script

When the dev kit is restarted, the system shows the following notification, as shown in figure 5, by default before the boot script is run.

**Figure 5.  Boot script notification**

<img src="https://mintcdn.com/microsoft-4404708b/6TXzXmujKayly5Sf/images/gdk/tools/script_authoring_tool_notification.png?fit=max&auto=format&n=6TXzXmujKayly5Sf&q=85&s=db76c8550c11652e9134cec333ca9980" alt="Screenshot of boot script notification" width="535" height="205" data-path="images/gdk/tools/script_authoring_tool_notification.png" />

This notification enables you to cancel a dangerous script. For example, a script that restarts the console isn't a good choice for a boot script because it would result in an endless restart loop. To cancel a script, press and hold the XBOX button on your controller when this notification appears.

The cancel notification is enabled by default and adds a small amount of time to the startup sequence. To disable this notification, select the **Run scripts immediately on startup** option under **Unattended script settings** as shown in figure 1.

<a id="front_panel" />

## Invoke scripts from the XBOX One X dev kit front panel

The XBOX One X dev kit has a built-in front panel display and five programmable buttons. You can configure any of these buttons to perform a custom action when the button is pressed. This includes both built-in actions and custom actions that you create by using the script authoring tool.

To map a script to a button on the front panel, select **Add for front panel buttons** in the script authoring tool to copy the script to the dev kit. Then, follow the instructions in [Managing console automation](/tools/tools-console/xbom/manager-tool-automation) to remap the button to your custom script.

<Note>This feature appears only when XBOX Device Portal is connected to an XBOX One X dev kit.</Note>

<a id="ID4EBBAC" />


## Related topics

- [XBOX Device Portal (Windows Device Portal on XBOX)](/tools/tools-console/wdp/index.md)
- [PlayFab Live service management documentation](/services/playfab/live-service-management/index.md)
- [MicrosoftGame.config overview](/build/core-features/common/game-config/MicrosoftGameConfig-Overview.md)
- [A designer's guide to building touch controls](/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-tak-designers-guide.md)
- [Getting started with Data Explorer advanced mode](/services/playfab/data-analytics/learn-data/data-explorer/getting-started-with-data-explorer-advanced.md)
