AddParameters adds to the default parameters, which are “REBOOT=ReallySuppress /QB!”. But you have other parameters you are using, so that won’t help. Stick to just -Parameters.
There is still an issue with quotes. You shouldn’t use double quotes next to each other like that. Encapsulate the entire parameter in single quotes such as: Execute-MSI -Action Install -Path "HPE_RM_x86.msi" -Parameters '/qn ALLUSERS="1" INSTALLDIR=“C:\Program Files\Hewlett-Packard\HP Records Manager” ADDLOCAL=HPTRIM,Client HPTRIMDIR=“C:\HP Records Manager” PRIMARYURL=“ServerName:1137” DEFAULTDBNAME=“DBName” TRIM_DSK=“1” STARTMENU_FOLDER_ADMIN=“HP Records Manager” AUTOGG=“1” STARTMENU_NAME=“HP Records Manager” TRIMREF=“DSK”'
What is the Installation Program command line in SCCM?
After executing PSADT: does it generate a log under C:\Windows\Logs\Software?
While this may work, the usage of double quotes when doing the -AddParameters is required a lot of the time. I’ve used this in multiple deployments without any issues, trying to omit them and use the -Parameters option ends up not working correctly. I believe his issue is with where it’s attempting to write the logs, not the parameters being passed based on the documentation for the software I read through. Unfortunately we’ve not heard back as to if any solution has worked for him
Hi Guys, sorry been busy here. I was trying to use InstEd application to create mst file but could not really understand how it works. My next step would be to use Master Packager to see if i can create MST file. I will also try to use AgetQ suggestion. In regards to the logs files, i have not checked them yet. Thank you for all your help, i will keep you guys posted on what worked for me
The command line used earlier would not work as when using double-quotes with the Parameters switch you need to add the backtick character (`) before each double-quote. This is not required when using single-quotes as powershell interprets items between single quotes literally.
Here is your command line with the double-quotes escaped using the backtick (note that to get the backtick to show I had to use double backticks around the entire code block):
Execute-MSI -Action Install -Path "HPE_RM_x86.msi" -Parameters "/qn ALLUSERS=1 INSTALLDIR=`"C:\Program Files\Hewlett-Packard\HP Records Manager`" ADDLOCAL=HPTRIM,Client HPTRIMDIR=`"C:\HP Records Manager`" PRIMARYURL=`"ServerName:1137`" DEFAULTDBNAME=`"DBName`" TRIM_DSK=`"1`" STARTMENU_FOLDER_ADMIN=`"HP Records Manager`" AUTOGG=`"1`" STARTMENU_NAME=`"HP Records Manager`" TRIMREF=`"DSK`""
If you look at your script in the PowerShell ISE you can get some sense of whether you’ve made a syntax error by looking at the syntax highlighting. If you copy/paste the above into the ISE you should see that the Parameters string is all in dark red. If you delete one of the backticks you’ll see that the color of the string changes to blue.
When trouble-shooting your deployment there are a few things I would do:
Check that the PSADT log file is being created in C:\Windows\Logs\Software. If this log does not exist then either there is a syntax error in your script or the line calling the script in SCCM is wrong. Check the SCCM log files to determine if you’ve got the command line wrong.
If the PSADT log file exists then you should be able to copy the exact command line being used to install the software and paste it into an elevated command prompt. This is a good way to see if the issue is an error in the command line.
Check the MSI log file. Normally this will be located in C:\Windows\Logs\Software. The MSI log file will generally highlight if there is an issue with a specific parameter being passed to the MSI.
When troubleshooting temporarily replace the /qn switch with the /qb switch to show the basic interface and make it easier to see error messages coming from MSIEXEC.
One other issue to be careful of is if you are copying/pasting code examples from online its easy for mistakes to sneak in. For example some of the code examples above contain smart quotes (“”) or are missing the backtick before double-quotes in the Parameters switch. If you copy/paste straight from a forum its easy to miss issues like these.
Powershell’s quoting can be… “messy” to get a handle on when coming from other languages. What you can do is put the full command in a .cmd file and call that from PSADT. OR use Execute-Process, calling MSIEXEC.exe and passing all the parameters to it. I’ve seen that work better as well.
The below calls “install.vbs” that’s in the a “Files” subfolder off of whereever the Deploy-Application.ps1 is located:
Execute-Process -Path “cscript.exe” -parameters “"$dirFiles\install.vbs”" -WindowStyle Hidden -IgnoreExitCodes ‘3010,1618’
OK, so i might have spoken to soon. it worked on one of my test computers, but it did not worked on two other machines. Log file exists, HewlettPackard_HPRM_8.3_x64_EN_01_PSAppDeployToolkit_Install.log and it does not contain any errors, HPE_RM_x86_Install.log this log however does have some errors.
MSI (s) (78:D4) [11:49:58:951]: Note: 1: 2205 2: 3: Error
MSI (s) (78:D4) [11:49:58:951]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1707
MSI (s) (78:D4) [11:49:58:951]: Note: 1: 2205 2: 3: Error
MSI (s) (78:D4) [11:49:58:951]: Note: 1: 2228 2: 3: Error 4: SELECT Message FROM Error WHERE Error = 1709
MSI (s) (78:D4) [11:49:58:951]: Product: HPE Records Manager x86 – Installation completed successfully.
MSI (s) (78:D4) [11:49:58:952]: Windows Installer installed the product. Product Name: HPE Records Manager x86. Product Version: 8.30.9231. Product Language: 1033. Manufacturer: Hewlett Packard Enterprise. Installation success or error status: 0.
This is the command line from the Toolkit_Install.log
[Installation] :: Executing [C:\Windows\system32\msiexec.exe /i “C:\Windows\ccmcache\1a\Files\HPE_RM_x86.msi” /qn ALLUSERS=1 INSTALLDIR=“C:\Program Files\Hewlett-Packard\HP Records Manager” ADDLOCAL=HPTRIM,Client HPTRIMDIR=“C:\HP Records Manager” PRIMARYURL=“AWINRIM1:1137” DEFAULTDBNAME=“MGM PRD” DEFAULTDB=“MP” TRIM_DSK=“1” STARTMENU_FOLDER_ADMIN=“HP Records Manager” AUTOGG=“1” STARTMENU_NAME=“HP Records Manager” TRIMREF=“DSK” /L*v “C:\Windows\Logs\Software\HPE_RM_x86_Install.log”]…
It seems like it strips those extra quotes that you had in your post.
Thats the idea, the backtick (`) is there so that Powershell interprets the backquotes literally rather than interpreting them as a string delimiter.
Are you sure that the installation actually failed? The MSI returned error code 0 (no errors). Error code 1707 is “Installation operation completed successfully.”. Error code 1709 does not appear to be a critical error (Product:  – ). See the list of Windows Installer error messages at the link below.
What are the issues you are seeing on the machines where the install “failed”? I suggest you try my trouble-shooting suggestions (numbers 2 and 4 in my previous post).
On your two other test computers have you previously run the deployment? One issue I’ve come across on test devices is that an unsuccessful install of an MSI can still leave enough trace to prevent any future installs from being successful. I always test on a VM with a clean install of our SOE for just this reason. I revert the VM after each trial run so the application is always being installed in a clean environment.