InstallAware errors with SCCM
Had a ticket escalated to me from our applications team where a setup.exe installation program would work fine when run manually, but would fail to install when run through Microsoft System Center Configuration Manager (SCCM).
The installer for this particular application was made by InstallAware. A quick google search for InstallAware SCCM turns up a lot of people having problems installing programs packaged with this toolkit on SCCM. Some of the posts are worth a read as interesting examples of how NOT to provide tech support.
The only useful suggested steps are:
- Set ALLUSERS=TRUE on the command line (doesn’t help)
- Running the command with PSEXEC -i -s (doesn’t help)
- Changing to the toolkit’s Native Engine instead of MSI (not an option as an end user)
Here’s how I got it working
First step was to turn on logging in the SCCM package using the /L=”C:\Windows\Temp\Logfile.txt.”
Reviewing the log revealed this error message:
MSI (s) (68:34) [09:38:04:280]: Executing op: FolderCreate(Folder=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Net Deed Plotter,Foreign=0,,)
MSI (s) (68:34) [09:38:04:282]: Executing op: FolderCreate(Folder=C:\Windows\TEMP\mia277A.tmp\SetupNetDeedPlotter.exe\,Foreign=0,,)
MSI (s) (68:34) [09:38:04:284]: Note: 1: 1312 2: C:\Windows\TEMP\mia277A.tmp\SetupNetDeedPlotter.exe
MSI (s) (68:34) [09:38:04:286]: Note: 1: 2205 2: 3: Error
MSI (s) (68:34) [09:38:04:287]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1312
Error 1312. Cannot create the directory 'C:\Windows\TEMP\mia277A.tmp\SetupNetDeedPlotter.exe'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit.
MSI (s) (68:34) [09:38:04:289]: Note: 1: 2205 2: 3: Error
MSI (s) (68:34) [09:38:04:290]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (68:34) [09:38:04:292]: Product: Net Deed Plotter -- Error 1312. Cannot create the directo. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit.
Action ended 9:38:04: InstallFinalize. Return value 3.
The setup program obviously is creating a temporary folder in C:\Windows\Temp\mia277A.tmp and extracting itself there before installing. So the question is: why is it trying to create a directory where the setup executable is already located?
At the top of the log file is a Variables section which details installation parameters and detected settings (locations of Program Files, Common Files, etc). A quick review of the Variables revealed this setting:
The first line of the error message above shows that the installer was at the point of installing shortcuts (it was creating a folder under Start Menu\Programs). It is now clear that the next line was trying to place a shortcut on the desktop. Since the DesktopDir variable was incorrectly detected by the toolkit, it ran into the error.
(TLDR) So finally the solution
Add the DESKTOPDIR variable to the command line. The directory when installing as SYSTEM is C:\USERS\PUBLIC\DESKTOP. (The variable for this in Powershell is “$env:Public\Desktop.”
SETUP.EXE /S DESKTOPDIR="C:\Users\Public\Desktop"
Hope this helps!