ScriptApplication [SPFSDK][VMROLE]
Applies To: Windows Azure Pack
The ScriptApplication object is a Script [SPFSDK][VMROLE] object that has a list of child scripts to execute when a Windows-based virtual machine is provisioned.
Type Hierarchy
ResourceExtension [SPFSDK][VMROLE].ExtensionSettings [SPFSDK][VMROLE].ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE].ScriptApplication
Syntax
{
"DeploymentName": "string",
"ScriptCommands": [
<Script>
],
"EnvironmentVariables": [
<EnvironmentVariable>
],
<All Script properties except DeploymentOrder, ScriptType, and RestartOnRetry>
}
Properties
The ScriptApplication object has all the properties of the Script [SPFSDK][VMROLE] type, except for the following:
DeploymentOrder
ScriptType
RestartOnRetry
The ScriptApplication object always restarts when the parenting extension reference application is rerun.
Name |
Type |
Required |
Default value |
Description |
---|---|---|---|---|
DeploymentName |
String |
Yes |
None |
The name of the deployment. |
ScriptCommands |
Array of Script [SPFSDK][VMROLE] |
No |
null |
The scripts to run during provisioning. |
EnvironmentVariables |
Array of EnvironmentVariable |
No |
null |
The environment variables to set on the scripts that are identified by the ScriptCommands property. |
EnvironmentVariable
Name |
Type |
Required |
Default value |
Description |
---|---|---|---|---|
Name |
String |
Yes |
None |
The name of the environment variable to set. |
Value |
String |
Yes |
None |
The value of the environment variable. |
Remarks
The following code example provides a sample ScriptApplication object that has one child script.
{
"DeploymentName": "ScriptDeployment1",
"ScriptCommands": [
{
"AlwaysReboot": false,
"ApplicationPayloadId": "366819c2-bf11-4c85-9555- 6293e2a3ce7b",
"ErrorPolicy": "FailOnMatch",
"ExecutableAndParams": {
"Executable": "cmd.exe",
"Parameters": "/q /c installwebdeploy.cmd"
},
"ExitCodeRegex": "[1-9][0-9]*",
"MaxOutputSize": 1048576,
"RebootExitCodeRegex": "{1641}|{3010}|{3011}",
"RestartOnRetry": false,
"ScriptBlock": null,
"ScriptCredential": "domain\\user:mypassword",
"ScriptType": "PreInstall",
"StandardErrorPath": "c:\err.txt",
"StandardErrorRegex": ".+",
"StandardInput": null,
"StandardOutputPath": "c:\out.txt",
"StandardOutputRegex": null,
"TimeoutInSeconds": 900,
"WorkingDirectory": null
}
],
"EnvironmentVariables": [
{
"Name": "envvar1",
"Value": "test value1",
},
{
"Name": "envvar2",
"Value": "test value2",
},
],
"AlwaysReboot": false,
"ApplicationPayloadId": "49c1ccdb-9068-4b91-9409-0a7ca8a1d291",
"ErrorPolicy": "FailOnMatch",
"ExecutableAndParams": {
"Executable": "cmd.exe",
"Parameters": "/q /c msiexec sharepoint.msi"
},
"ExitCodeRegex": "[1-9][0-9]*",
"MaxOutputSize": 1048576,
"RebootExitCodeRegex": "{1641}|{3010}|{3011}",
"ScriptBlock": null,
"ScriptCredential": "username:password",
"StandardErrorPath": "c:\err.txt",
"StandardErrorRegex": ".+",
"StandardInput": null,
"StandardOutputPath": "c:\out.txt",
"StandardOutputRegex": null,
"TimeoutInSeconds": 900,
"WorkingDirectory": null
}
See Also
ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE]
SQLProfile [SPFSDK][VMROLE]
WebDeployApplication [SPFSDK][VMROLE]
SQLDacApplication [SPFSDK][VMROLE]
Script [SPFSDK][VMROLE]