Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Condition for deployment

Hello,

is there a way to create different condition for deployment?

Something like "registry key exists / does not exist", file, path exists/does not exists, Software not installed or installed?

For example:

i have apackage which installs a Software to patch %programfiles%\Software. Some Computers have this Software already installed. When i shedule a deployment to an ou i want to check "If path %programfiles%\Software exists -> skip Installation"

Regards

Marc

0

Comments

3 comments
Date Votes
  • The conditions native to PDQ Deploy do not allow for custom creation. You can however use a .bat file to check for existing conditions and then fire off deployments based on what passes.

    0
  • Hello,

     

    thanks for your reply. i can add an Addition step (script).

    In the script the condition and then use an Exit code? Error code?

    Lets say:

    Condition is "registry key hklm\Software\somethin" exists.

    Script checks the regkey.

    If exists Exit/error code 0, deployment will start (next steps)

    if does not exist, error/Exit code is 1.

    Deployment will stop.

    But then the deployment is failed in the pdq deploy console?

    Regards

    0
  • I just went through this exercise. You can add a step like;

    if exist "C:\Program Files\OpenVPN\bin\openvpn.exe" (

    EXIT /B 1
    )

    and then on the Options tab select 'Stop Deployment with Success' on the 'Error Mode' drop down. You package will stop with 'Success' at this step and not try to reinstall the application. 

    1