Unable to create MSI file due to exe file with spaces won't create shortcuts

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
MThomas
Posts: 3
Last visit: Wed Sep 01, 2021 9:11 am

Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by MThomas »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build:5.8.194.0
Operating system: Windows 10 1909
PowerShell version(s):5.1.18362.1714

*** Please add details and screenshots as needed below. ***

Unable to create shortcuts in start menu or any other location with my program "Service Desk Tool.exe" that has spaces in the executable.
I was able to create the MSI once I renamed the ServiceDeskTool.exe without spaces.

I'm hoping this gets fixed as soon as possible. I have the software check for updates and I would have to rewrite the program in order for it to work with a different name.

Here is the error I get. I also upload the build file in the private upload.
\bin\x64\heatout.wix(9) : error CNDL0014 : The Icon/@Id attribute's value, 'Service Desk Tool.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
\bin\x64\heatout.wix(35) : error CNDL0014 : The Shortcut/@Icon attribute's value, 'Service Desk Tool.exe', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.

Error: Could not create MSI file
Error.PNG
Error.PNG (71.98 KiB) Viewed 7581 times
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
by Alexander Riedel » Tue Aug 31, 2021 9:16 pm
The error message is not about the shortcut target having a space in it.
The error message pertains to the icon specified. The icon file location is implied to be the install folder or a sub folder of that.
Specifying a path that only exists at build time has no meaning on the install side, so it leads to errors.
The proper value for the icon file would be Service desk tool.exe without any path specification.
It is however true that there is a problem with names that have a space in it, since the file name is also used as an identifier and those cannot have a space in it.

At any rate, since the icon file you specify is the target of the shortcut and you have the icon index at 0, you do not need to specify anything there, since that is the default anyway.
So if you just remove the icon file name, you should be fine.
Go to full post
Last edited by MThomas on Tue Aug 31, 2021 9:07 pm, edited 4 times in total.

User avatar
Alexander Riedel
Posts: 7785
Last visit: Wed Oct 20, 2021 9:23 am
Answers: 6
Been upvoted: 11 times

Re: Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by Alexander Riedel »

I have an MSI here that creates a shortcut to
[INSTALLDIR]SolitaireKiller\Sapien Service Test.exe
2021-08-31_17-24-12.png
2021-08-31_17-24-12.png (167.02 KiB) Viewed 7602 times
As you can see it has spaces in it. The MSI is created without problems. Can you share the .psbuild file? You can upload it
privately here: https://www.sapien.com/support/upload
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Alexander Riedel
Posts: 7785
Last visit: Wed Oct 20, 2021 9:23 am
Answers: 6
Been upvoted: 11 times

Re: Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by Alexander Riedel »

Please also include or post the actual output. If an MSI build fails it displays an error message. Please always post those. Just saying "it does not work" is insufficient.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
MThomas
Posts: 3
Last visit: Wed Sep 01, 2021 9:11 am

Re: Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by MThomas »

I posted the additional information you all asked for. Please see error and screenshot. I also uploaded the build file with the link you all provided. I noticed you compiled from local source vs compiling from network source. I've had no problem for the past 4 years with compiling from the network source and producing the shortcut in the start menu. Company and program named were changed a while back but those early builds did produce the shortcut in the start menu with the new name and company. Not sure why this stopped working.

Thanks

User avatar
Alexander Riedel
Posts: 7785
Last visit: Wed Oct 20, 2021 9:23 am
Answers: 6
Been upvoted: 11 times

Re: Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by Alexander Riedel »

The error message is not about the shortcut target having a space in it.
The error message pertains to the icon specified. The icon file location is implied to be the install folder or a sub folder of that.
Specifying a path that only exists at build time has no meaning on the install side, so it leads to errors.
The proper value for the icon file would be Service desk tool.exe without any path specification.
It is however true that there is a problem with names that have a space in it, since the file name is also used as an identifier and those cannot have a space in it.

At any rate, since the icon file you specify is the target of the shortcut and you have the icon index at 0, you do not need to specify anything there, since that is the default anyway.
So if you just remove the icon file name, you should be fine.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
MThomas
Posts: 3
Last visit: Wed Sep 01, 2021 9:11 am

Re: Unable to create MSI file due to exe file with spaces won't create shortcuts

Post by MThomas »

Thank you, that did work. I removed it and now it compiles and the shortcut is there with the right icon.