Powershell Detection Method for Software Deployment

This topic contains 3 replies, has 3 voices, and was last updated by  Will Anderson 1 week, 5 days ago.

  • Author
    Posts
  • #79228

    Gennie
    Participant

    Hello Everyone,

    I'm trying to deploy a 3rd party software, SRSRec, through SCCM. When this application installs, it generates a unique GUID. Each PC it installs on will have a different GUID for the same application. Because of this, I can't use a simple registry entry for the detection method. This application will have new upgrade versions in the future.
    I need to use the Powershell detection method because the only common indication for the current version ID across all of the PCs after a successfull installation is inside a .xml file.
    Inside the Description.xml file, it contains the current version number "8.5.343.5". This xml file is located in the install directory: c:\program files (x86)\SrSrec\description.xml.
    I basically want the detection method to day, if it can't find this path with this version number that will tell SCCM the application is not installed.

    Powershell:
    if ((get-content -path 'c:\program files (x86)\SrSrec\description.xml | select-string -pattern "8.5.343.5") -eq $null)
    {
    }
    else
    {
    }

    Problems I am running into:
    In my test environment(three test PCs), I initially used a registry detection method(from one of the test PCs I did a manual install). Software center on all three test PCs displayed the SrSrec software in Software Center. However after I switched to Powershell Detection method, only the 1 of the three now shows SrSrec in Software Center. I refresh and pulled on the other two, still not showing software. I verified that Powershell script is set to bypass in the client settings.

    I need help, I am not sure if the issue is due to my PS script or something else.

    Thanks in advance for any help!

  • #79232

    Olaf Soyk
    Participant

    In most cases you can use some dll file or executable files and check their version info for detection. If you really wnat to use a script detection you have to check whatever you identified as criteria and if you deside it is successfully installed you have to output something to the standard output. Otherwise you output nothing. The script should alway exit successfully (Exit 0).

    When you have a xml file I would reccomend not to use simple string detection instead of you should use xml node operation.

  • #79294

    Will Anderson
    Keymaster

    You could also generate a NOIDMIF with the information you want to track as part of the installation. Then import it and pull it into your reporting. I'd go back to the manufacturer though. It sounds like they aren't following typical software packaging guidelines if it's generating random GUIDs for the app ID.

  • #79297

    Will Anderson
    Keymaster

    You could also generate a NOIDMIF with the information you want to track as part of the installation. Then import it and pull it into your reporting. I'd go back to the manufacturer though. It sounds like they aren't following typical software packaging guidelines if it's generating random GUIDs for the app ID.

You must be logged in to reply to this topic.