SCCM 2012 issue with application detection occuring too quickly

Hello,

I am writing this post as I would have a question regarding the application detection in SCCM 2012.
Indeed, I created some applications in SCCM 2012 calling Powershell scripts in order to perform the install/uninstall.

I my Powershell install script, I use the the "Start-Process" method with "-PassThru" and "-Wait" arguments and I retrieve the Exit Code afterwards.
On the SCCM server, then I have configured a detection method set to check the presence of executable files in the install folder of the application being installed.

I noticed that for some software packages, then the detection method is performed very shortly by SCCM 2012 when the Powershell install script is run.
I am wondering if this issue does not occur when an EXE installer is called and when one or several MSI installers are extracted from it during the install. For instance, the SCCM server detects the exit code from the EXE installer and believes the install is finished and then performs the application detection whereas a MSI installer is still running.

Unfortunately, depending on the install sources, then sometimes I am obliged to use the EXE installer provided with silent switches.

Do you know how the application detection can be improved and optimized in that case ?

Thanks in advance.

August 15th, 2015 7:32pm

Sounds like the install/uninstall command is actually starting another process for doing the actual thing so your script just executes something that starts another thing that does the job. I've added simple wait time (Start-Sleep 30 in Powershell for example) for the cases like this.
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2015 4:05am

From my personal experience I have found this issue to be fairly rare, if the installer is created correctly by the Vendor then it should return the correct exit code. Autocad apps spawn another process but there is a /W switch which prevents the stub from closing too soon.

Is there any reason you are calling each installer with PowerShell and not just putting the command line directly in ConfigMgr? I am a big fan of keeping things as simple as they need to be to get the job done.


August 16th, 2015 5:42am

Sounds like the install/uninstall command is actually starting another process for doing the actual thing so your script just executes something that starts another thing that does the job. I've added simple wait time (Start-Sleep 30 in Powershell for example) for the cases like this.
  • Edited by Narcoticoo Sunday, August 16, 2015 8:04 AM
  • Proposed as answer by Richard.Knight Sunday, August 16, 2015 9:48 AM
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2015 8:04am

Sounds like the install/uninstall command is actually starting another process for doing the actual thing so your script just executes something that starts another thing that does the job. I've added simple wait time (Start-Sleep 30 in Powershell for example) for the cases like this.
August 16th, 2015 8:04am

From my personal experience I have found this issue to be fairly rare, if the installer is created correctly by the Vendor then it should return the correct exit code. Autocad apps spawn another process but there is a /W switch which prevents the stub from closing too soon.

Is there any reason you are calling each installer with PowerShell and not just putting the command line directly in ConfigMgr? I am a big fan of keeping things as simple as they need to be to get the job done.


Free Windows Admin Tool Kit Click here and download it now
August 16th, 2015 9:41am

From my personal experience I have found this issue to be fairly rare, if the installer is created correctly by the Vendor then it should return the correct exit code. Autocad apps spawn another process but there is a /W switch which prevents the stub from closing too soon.

Is there any reason you are calling each installer with PowerShell and not just putting the command line directly in ConfigMgr? I am a big fan of keeping things as simple as they need to be to get the job done.


August 16th, 2015 9:41am

Hello,

Sorry for not having replied before but I think that my profile on Technet is not configured to send notifications by email in case of replies posted in the open thread.
This is only when I returned to this thread that I discovered all your replies.
Anyway, thanks for all your suggestions.

@Narcoticoo : this is indeed one of the solutions I could find temporarily but I found this solution not very accurate depending on installers for which I had to deal with.

@Richard.Knight : I am using Powershell scripts in order to perform several actions before/after the silent install (i.e. : configuration files to copy or registry keys to apply, custom logs populated one goes along the script runs each command and so on...). I must admit that I have no problems with single MSI installers, only with EXE installers or any self extracting installer for which silent install cannot be managed otherwise.

However, I have recenty tried to catch the $LASTEXITCODE variable after my install string and it worked much better than a simple "ExitCode".

Fred

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 4:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics