3 Replies Latest reply on Sep 27, 2011 7:57 AM by Bill Robinson

    Scripts for undeploy

    GuruPrasad D S

      I need scripting example for  uninstall or undeploy the deployed application?

        • 1. Re: Scripts for undeploy
          Bill Robinson

          Look at the docs for the application.  you should look at this site:

           

          http://www.appdeploy.com

           

          it has a lot of into on silent installs.

          • 2. Scripts for undeploy
            GuruPrasad D S

            for deployment we have cmd like

            DeployJob executeJobAndWait etc..

            The below code is for deploy a msi package

             

            #sh DeployJob.nsh /SWdeploy localhost /allServers msi_deploy

            #!/usr/bin/nsh

            blcli_setoption serviceProfileName default

            blcli_setoption rolename BLAdmins

            blcred cred -acquire -profile default -username BLAdmin -password p@ssw0rd

            blcli_connect

             

             

            JOB_GROUP_NAME=/SWdeploy

            TARGET_SERVER=localhost

            TARGET_GROUP="/allServers"

            DEPLOY_JOB_NAME="msi_Deployment1"

             

            #JOB_GROUP_NAME="${1}"

            #TARGET_SERVER="${2}"

            #TARGET_GROUP="${3}"

            #DEPLOY_JOB_NAME="${4}"

             

            SIMULATE=true

            COMMIT=true

            INDIRECT=false

            SOFTWARE_TYPE=MSI_WINDOWS_INSTALLABLE

             

            DEPLOY_OPTS="$SIMULATE $COMMIT $INDIRECT"

             

            blcli_execute DepotObject getDBKeyByTypeStringGroupAndName $SOFTWARE_TYPE /Patche "php-5.2.6-win32-installer.msi"

            blcli_storeenv SOFTWARE_KEY

            blcli_execute JobGroup groupNameToId "${JOB_GROUP_NAME}"

             

            blcli_storeenv GROUP_ID

             

            blcli_execute DeployJob createSoftwareDeployJob "${DEPLOY_JOB_NAME}" $GROUP_ID $SOFTWARE_KEY $SOFTWARE_TYPE $TARGET_SERVER $DEPLOY_OPTS

             

            blcli_storeenv DEPLOY_JOB_KEY

             

            blcli_execute Job addTargetGroup $DEPLOY_JOB_KEY "${TARGET_GROUP}"

             

            blcli_storeenv DEPLOY_JOB_KEY

             

            blcli_execute DeployJob executeJobAndWait $DEPLOY_JOB_KEY

             

            blcli_storeenv RUN_KEY

             

            blcli_execute JobRun jobRunKeyToJobRunId $RUN_KEY

             

            blcli_storeenv RUN_ID

             

            blcli_execute Utility exportDeployRun /SWdeploy msi_Deployment1 $RUN_ID "C:/Users/Administrator/Desktop/sampleJobResult.csv"

            • 3. Scripts for undeploy
              Bill Robinson

              i don't know if there is a way to create/run an 'undo' job from the blcli.  there is a way to create an uninstall job (not undo), but only from the gui afaik.