MSIX Packaging Tool and Services with file based command line arguments, or maybe the AppInstaller

MVP

Application: Solidworks DraftSite

The application installs a service (2 actually, but the dsHttpApiService.exe is the problem one).  The service is set to run as a separate process, and the MSI installer sets the service to run the exe with a command line argument which is the path to the service.

 

In the AppXManifest this looks like an application extension:

<Extensions>
<desktop6:Extension Category="windows.service" Executable="VFS\ProgramFilesX64\Dassault Systemes\DraftSight\bin\dsHttpApiService.exe" EntryPoint="Windows.FullTrustApplication">
<desktop6:Service Name="DraftSight API Service" StartupType="auto" StartAccount="localSystem" Arguments="[{ProgramFilesX64}]\Dassault Systemes\DraftSight\bin\dsHttpApiService.exe" />
</desktop6:Extension>
</Extensions>

 

After installation of the package, the service can be seen running with a command line argument that still contains "[{ProgramFilesX64}]" in the argument.

 

Either the capture is incorrect, or the package installation should have interpreted the variablized name before configuring the service.  I suppose the capture could have devariablized the path and then used a relative path similar to the executable, but since it also sets the working directory to system32 a relative path might be an issue too.  But in either case, it is wrong as is.

 

1 Reply
Update: Changing the manifest to use VFS\ProgramFilesX64 ends up with AppInstaller just giving the VFS syntax to the service in the command line. This probably means that the MMPT should fix the manifest this way, and then AppInstaller should interpret the argument list the same way it does the executable and set the service to have the argument with the full path as installed.