auhn Posted October 12, 2016 Report post Posted October 12, 2016 Hello, I'm experiencing a very odd problem. Certain applications I'm trying to install at TS runs but installs nothing. As an example: I have downloaded and packaged 2 programs (HP 3D DriveGuard 6 and HP Hotkey Support 6) to be installed during TS for HP EliteBook 800 series laptops. The TS runs the action "Installing HP 3D DriveGuard" which is a "Run PowerShell Script" action. The installation script runs the following command: Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"HP 3D DriveGuard.msi`" /qn /norestart /l* `"c:\windows\ccm\logs\driveguard.log`"" -PassThru -Wait During the TS the action is run but immediately moves on to the next action. I see that the above driveguard.log file has been created and open it, but it's empty. The EventViewer reflects this as it only notes that the installation started and immediately ended (no error messages anywhere). I've opened smsts.log and can see that the action is run and completed successfully. In short; SCCM and all logs I can find tell me the action is run and successfully completes, except the programs don't install, the installations don't even run. After the computer has been installed, I log in to Windows and copy the program installation files to a folder on the computer. I then open cmd.exe as an administrator and run the exact same command (powershell.exe -ExecutionPolicy Bypass -File Install.ps1). This time the installation runs and the program actually installs. I have attempted to run other actions as well like the action "Install Package" and run the above command as a program. I'm leaning towards the issues might be due to installations at TS being run under the System context and that somehow causes problem. I'm at a loss as to how I can proceed in troubleshooting the issue and resolving it. Can anyone please help me? Thank you, Best regards Quote Share this post Link to post Share on other sites More sharing options...
Peter33 Posted October 12, 2016 Report post Posted October 12, 2016 Most likely your script can't find the sources. Prvent this by using the following ode at the very top of your script. $myPath = Split-Path $script:MyInvocation.MyCommand.Path Set-Location $myPath Also use the "nonewwindow" Switch in the Start-Process line and catch the Exit Code of the command to return it to SCCM. $ec = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"HP 3D DriveGuard.msi`" /qn /norestart /l* `"c:\windows\ccm\logs\driveguard.log`"" -PassThru -Wait -NoNewWindow).ExitCode [Environment]::Exit($ec) 1 Quote Share this post Link to post Share on other sites More sharing options...
auhn Posted October 13, 2016 Report post Posted October 13, 2016 Thank you Peter33 for a quick reply. I did as you suggested and I believe that solved the problem. The installation now launches and the log file updates as expected. Thank you very much! Quote Share this post Link to post Share on other sites More sharing options...