You can use the Deployment Wizard to deploy a project directly to the host servers or to create a deployment script that you can run whenever you want. Deployment scripts offer the benefit that they can be modified to do additional tasks during the course of deployment (for example, file compression or custom logging).
When you deploy a project directly, you are copying the files to the host server(s) at the time of deployment.
![]() |
To deploy a project directly: |
Note | Your Deployment Servers are selected automatically in the server list. Any remote servers that have been mapped to in the Universal Files tab are also included in this list. You can deploy your project to any of these servers, however, only information for the Deployment Servers is included in the .apf file for the project. |
The Results window opens automatically and displays the results of your deployment on the Deployment tab.
![]() |
To view the results of a deployment: |
The Results window tells you the status for each file in your project along with the amount of time the deployment took.
Note | You can also view the results of a deployment by looking at the Deployment.log file in the Studio 4.5 directory. |
You can create a deployment script that can be run at any time. Deployment scripts are based on the VTOM model and can be generated in either JScript or VBScript (see ../../scripting_the_visual_tools_object_model/vtom.htmScripting the Visual Tools Object Model/afor more information on VTOM). The most powerful benefit of scripts is that, once they have been generated, they can be modified with custom code and saved.
There are three types of scripts that can be generated:
The Project-wide Upload Script generates a script that is identical in functionality to deploying the project directly. During a project-wide upload, the project is opened, uploaded, then closed.
The File-by-File Deployment Script creates a script that uploads each of the project files individually. During a file-by-file upload, the project is opened, each file is uploaded individually, then the project is closed.
The Project Element Iterator Script generates a script that performs a file-by-file upload with a set of nested loops, or iterations. The script iterates through each server, then each folder, then each file. Programmers who wish to do so can insert code in between the loops to add custom functionality during uploading.
The following section gives you some information about choosing the type of deployment script that will work best for you.
The Project-wide Upload Script is the most inflexible script. It works well in the case where you do not want to add custom code during the processing of deployment. You can still add custom code before and after deployment, however, with the Project-wide Upload Script, you are depending on Studio's deployment engine to perform all of the deployment tasks for you.
The File-by-File Deployment Script offers somewhat more flexibility. After generating a File-by-File Deployment Script, you can edit the script to deploy only a specified set of files. You can also add custom code during the course of deployment. The File-by-File Deployment Script is dependent, however, on the files existing in the project. If a file is included in the script but deleted from the project, then the script will run but the project will be out of date.
The Project Element Iterator Script is the most powerful script because it is not tied to specific servers or folders. This means that the script will continue to run regardless of project editing. The Project Element Iterator Script dynamically traverses the project folders runtime to appropriate the files to upload. When using a Project Element Iterator Script, the only thing you cannot change for a project is its name.
Once you have a created a script, you can open and edit it, run it, remove it, or change its properties.
![]() |
To create a deployment script: |
Note | Your Deployment Servers are selected automatically in the server list. Any remote servers that have been mapped to in the Universal Files tab are also included in this list. You can deploy your project to any of these servers, however, only information for the Deployment Servers is included in the .apf file for the project. |
The script is generated and, if you chose to do so, opened in the Editor window.
![]() |
To open a deployment script for editing: |
The script is opened in the Editor window. You can customize the script by editing it, then saving it.
![]() |
To run a deployment script: |
The Results window opens and informs you of the status of your deployment.
![]() |
To remove a deployment script: |
You are asked to confirm that you want the script deleted.
The script is removed from the Deployment Scripts list.
![]() |
To edit a script's properties: |
Note | The only property you can edit for a script is its description. |