BDD Extension: ZTECustomConnect

By arwidmark / February 15, 2007

During the LTI and ZTI deployment process, you may require access to a network resource that is on a server different from that hosting the deployment point. In order to access resources on another server though you must somehow authenticate to it first. For example, you might want to install an application from a shared folder on a server other than that hosting the deployment point that the BDD 2007 scripts use.


Using the ZTIConnect.wsf script, you can connect to other servers and access resources on them. The syntax for the ZTIConnect.wsf script is as follows (where unc_path is a UNC path to connect to the server):

Cscript.exe “%SCRIPTROOT%\ZTIConnect.wsf” /uncpath:unc_path

In most instances, you run the ZTIConnect.wsf script as a task sequencer task. Run the ZTIConnect.wsf script prior to tasks requiring access to a server other than the server hosting the deployment point.


— MODIFICATION HERE —


Unlike ZTIConnect.wsf above, ZTECustomConnect.wsf can be used to connect resources defined in the customsettings.ini instead of the task sequencer command line. It also utilizes custom credentials to connect to these resources as opposed to using the standard defined UserID, UserPassword, & UserDomain properties.


ZTECustomConnect.wsf takes advantage of the Customsettings.ini rules in order to customize the connection to your resources needed for a given location/role/etc. This allows more of a dynamic connection to resources utilizing seperate credentials than those supplied for the distribution share connection (Ex: UserID property, etc).


To add the ZTECustomConnect.wsf script to your scripts folder as an accessible script











1.


Copy & Paste the code below the —Code Snippet— below in this article into a blank text file and save it as ZTECustomConnect.wsf.


2.


Copy or Move the ZTECustomConnect.wsf script to your scripts folder under your distribution share.


(Ex: \\server1\distribution$\scripts\ZTECustomConnect.wsf)


To add the required Custom Properties to your customsettings.ini or “Rules” tab of your deployment point




















1.


Start Deployment Workbench.


2.


In the console tree, navigate to Deploy->Deployment Points.


3.


In the details pane, right-click dp (where dp is the deployment point whose customsettings.ini you want to modify), and then click Properties.


4.


Click the Rules tab, navigate to Properties=  and add the following custom properties:


CustomUNCPath, CustomUserID, CustomUserPassword, CustomUserDomain


Note   Ensure that you add a comma between each custom property.


5.


Set the values of the custom properties in a section that will be processed by your Priorities list at the top of your customsettings.ini


Sample CustomSettings.ini snip…


Priorities=MyApplicationsShare, Default
Properties=CustomUNCPath, CustomUserID, CustomUserPassword, CustomUserDomain
 
[MyApplicationsShare]
CustomUNCPath=\\appserver1\applications
CustomUserID=appServiceAcct
CustomUserPassword=$AppInstall
CustomUserDomain=MyDomain

[Default]
OSInstall=Y


Note: If any of these custom properties are not assigned a value than the ZTECustomConnect.wsf will not process.


To add the ZTECustomConnect.wsf script as a task to the task sequence of a build






















1.


Start Deployment Workbench.


2.


In the console tree, navigate to Builds.


3.


In the details pane, right-click build (where build is the build whose task sequence you want to modify), and then click Properties.


4.


Click the Task Sequence tab, navigate to group (where group is the group in which you want to run the ZTECustomConnect.wsf script), click Add, and then click Task.


Note   Ensure that you add the task prior to any tasks requiring access to the target server.


5.


Complete the Properties tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click Apply.


Completing the Properties Tab of the New Task
















In this box Do this

Name


Type Custom Connect to server (where server is the name of the server to which you want to connect).


Description


Type description (where description is text that explains why the connection needs to be made).


Command line


Type Cscript.exe “%SCRIPTROOT%\ZTECustomConnect.wsf”.



6.


Complete the Options tab of the new task by using the information in the table below, accepting default values if not otherwise specified, and then click OK.


Completing the Options Tab of the New Task













In this box Do this

Success codes


Type 0. (The ZTECustomConnect.wsf script returns these codes upon successful completion.)


Conditions list box


Add any conditions that might be necessary (in most instances this task requires no conditions).



Upon completion of adding the task to run the ZTECustomConnect.wsf script, subsequent tasks can access network resources on the server specified in the CustomUNCPath custom property defined in the customsettings.ini as described ablove.


–Code Snippet–



  


  



About the author

arwidmark