Script Packager MSI Error - heat5150 - LGHT0094

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
EMHTSapien
Posts: 6
Joined: Tue Jul 25, 2017 7:57 am

Script Packager MSI Error - heat5150 - LGHT0094

Post by EMHTSapien »

Product, version and build: Powershell Studio 5.7.172
32 or 64 bit version of product: 64
Operating system: Windows 10
32 or 64 bit OS: 64


When I am attempting to build an MSI I get the following errors:

Code: Select all

Building MSI file...
heat.exe : warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\speedtest.exe. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\speedtest.exe, error: 193
heat.exe : warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\Test-Services.exe. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\Test-Services.exe, error: 193
heat.exe : warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\InstallerFiles\bin\x64\CopyShortcut.exe. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\InstallerFiles\bin\x64\CopyShortcut.exe, error: 193
heatout.wix
C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\heatout.wix(70) : error LGHT0094 : Unresolved reference to symbol 'Directory:ProgramFilesFolder' in section 'Product:{SANITIZEDGUID}'.

Error: Could not create MSI file

6 error(s), 3 warning(s)

I am unable to build an MSI and don't understand what I need to do in order to fix this issue.

Thank you in advance for your help.

User avatar
Olga_B
Site Admin
Posts: 147
Joined: Mon May 15, 2017 9:06 am

Re: Script Packager MSI Error - heat5150 - LGHT0094

Post by Olga_B »

Generally this type of error indicates that the file specified does not exist or is not accessible. Possible not in the location expected.
Check that your folder has write permissions.

There is an error : Unable to load file: C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\MSI_BuildFolder\Test-Services.exe, error: 193

Could you attach .psbuild file?
And screenshot of Installer/Files and Folders settings in Script Packager

User avatar
EMHTSapien
Posts: 6
Joined: Tue Jul 25, 2017 7:57 am

Re: Script Packager MSI Error - heat5150 - LGHT0094

Post by EMHTSapien »

All files are located in my Documents area, so i'm not sure why PSStudio can't access them.

Code: Select all

[MSI]
ProductGUID=GUID
UpgradeGUID=GUID
ProductName=Test Services
ProductVersion=1.0.1.0
ProductType=Script Application
CompanyName=SANITIZED
ProductIcon=C:\ProgramData\SAPIEN\MSI Icons\Windows_Application_Installer.ico
LastVersion=1.0.1.0
ShortcutFile=
MSIName=Test_Services
OutputFolder=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64
StagingFolder=
InstallFolder=[ProgramFiles]\[Company]\[Product]
UseUI=1
64BitInstall=1
MinimumPowershellVersion=PowerShell Version 5
AllUsers=1
AsAdmin=1
Certificate=SANITIZED
Password=
CertificateThumbPrint=SANITIZED
TimeStampURL=http://timestamp.globalsign.com/?signature=sha2
UseSigningWizard=0
ServiceName=Test-Services
ServiceDisplayName=Test-Services
ServiceDescription=
ServiceLoadGroup=
ServiceServiceType=ownProcess
ServiceStartupType=auto
ServiceErrorControl=normal
ServiceInteractive=0
ServiceVital=0
ServiceAccountName=LocalSystem
ServiceAccountPassword=
ServiceStartControl=install
ServiceStopControl=both
ServiceRemoveControl=both
ServiceWaitComplete=0
[Deploy]
MainFile=
Destination=
[MSI Files]
File1=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\Test-Services.exe
File2=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\speedtest.exe
File3=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\SecureString\Firewall.txt
File4=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\SecureString\Network.txt
File5=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\SecureString\Test-ServicesKey.key
File6=C:\Users\SANITIZED\Documents\Code\PowerShell\ScriptProjects\Test-Services\Test-Services\bin\x64\InstallerFiles\bin\x64\CopyShortcut.exe
[Package]
Output=Test Services
OutputPath=bin
IconFile=C:\ProgramData\SAPIEN\Stock Icons\tree.ico
Manifest=
ManifestType=1
STA=1
GenerateConfigFile=1
ResolveExternalScripts=0
Password2=
Username=
Engine=SAPIEN PowerShell V5 Host (Windows Forms)
Target=Microsoft Windows 64 Bit
UseRunAs=0
PFX=SANITIZED
PFXThumbPrint=
TimeStamp=http://timestamp.globalsign.com/?signature=sha2
PFXPassword2=
FileVersion=1.0.7.0
ProductVersion=1.0.7.0
ProductName=Test-Services
Description=
Company=
Copyright=Copyright (c) 2019 All rights reserved
InternalName=
OriginalName=Test-Services
Comments=
RestrictUser=SANITIZED
RestrictMAC=
RestrictMachine=
RestrictDomain=SANITIZED
RestrictInstance=1
ProhibitLogging=0
DisableLogging=0
DisableTranscript=0
RestrictedOS=10.0
AutoIncrementVersion=1
[MSIActions_CopyShortcut]
Name=CopyShortcut
FileName=CopyShortcut.exe
Folder=ProgramFilesFolder
Arguments=
ExecutionTime=3
NoImpersonation=0
WaitFinish=0
CheckReturn=0
ExecInstall=1
ExecUninstall=0
ExecMaintenance=0
[MSI Actions]
Action1=CopyShortcut


User avatar
EMHTSapien
Posts: 6
Joined: Tue Jul 25, 2017 7:57 am

Re: Script Packager MSI Error - heat5150 - LGHT0094

Post by EMHTSapien »

What's odd about this area, is that the shortcut normally would say "packaged executable" but if I hit the drop down, it just adds the places in Documents.

Please see attached
Attachments
Capture.PNG
Capture.PNG (22.22 KiB) Viewed 986 times

User avatar
Alexander Riedel
Posts: 7377
Joined: Tue May 29, 2007 4:43 pm

Re: Script Packager MSI Error - heat5150 - LGHT0094

Post by Alexander Riedel »

The folder structure seems to contain duplicates (I don't know if that is intentional) and usually those kind of errors from the WiX toolset indicate it cannot resolve or cope with the path names.
It is quite possible that these here simply get too long for the toolset.
I would suggest to restructure the folders so that there are no unnecessary replications of folders.
Additionally, the output folders should be in the root of your project to avoid confusion where files are copied.
...\Code\ProwerShell\ScriptProjects\TestServices\output would be a good choice I guess.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
EMHTSapien
Posts: 6
Joined: Tue Jul 25, 2017 7:57 am

Re: Script Packager MSI Error - heat5150 - LGHT0094

Post by EMHTSapien »

That did seem to be it. Strange, I've never ran into this before. Thank you for your help.