Anyway to check if a program is installed, if it is, skip the step?

Comments

2 comments

  • Adam Ruth

    Not at the present time, no, but we do have this as something we're planning on adding.  We have a number of conditions we want to add to the packages in addition to the Windows version and Architecture (64-bit, 32-bit). 

    0
    Comment actions Permalink
  • Jai Kang

    This would add a huge delay to the script, but something like this is probably the only option (assuming you prefer powershell)

    Modified wrapper I use for powershell scripts to illustrate error codes in this case:

    http://pastebin.com/3ja3XH2W

    If you want to return error codes reliably (at least in PS v2) you have to use the function as illustrated in:

    http://pastebin.com/YmVhb2J6

    You could get your Package to "stop" if the error code returned isn't 0.

    My big issue with this, however, is now you have a bunch of failed deployments. You're left to either write the computers that don't have a program installed to a UNC path like  \\pdqServer\PDQ\adobeReaderXNotInstalled.txt and then using another script to update your list of computers...

    Really the only solution (that's maintainable) would be to wait for conditional steps or massage a list from PDQ Inventory.

    I might be wrong in my understanding though.

    0
    Comment actions Permalink

Please sign in to leave a comment.