Jump to content


auhn

MSI not installing in Task Sequence

Recommended Posts

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

Share this post


Link to post
Share on other sites

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)
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.