Ghostbob
Posts: 3
Joined: Tue Aug 11, 2020 7:20 am

Msix: windows service installation

I'm trying to create a new MSIX package for our windows application which will be sideloaded. We decided to try to move from MSI to MSIX.

Using advanced installer and description below - MSI project works perfectly, but I have trouble with MSIX.

The main idea is:
- I'm creating 2 files: appinstaller & msixbundle. msixbundle contains bunch of dlls and 2 exe files. One of them is a windows service, another - our windows program...
- during MSI installation(in CustomActions section) I call bat file which calls one of exe files above with the parameter "install". Such actions install Windows Service.
- during MSIX installation I'm calling the Powershell script, which calls the same bat file... The PowerShell script is called through "AppCompat" section in the advanced installer project...

First problem: turns out, being an administrator on the computer I don't have enough rights to call exe file with parameters from the WindowsApps folder... It's a location where msix installed by default...

- I decided to change the approach and created a synchronized subfolder folder in "Files and Folders section" under the LocalApplicationData.I thought if I put needed files in this folder during the installation, then in custom actions after the installation I will be able to install the Windows Service I need. In this folder, I added a bunch of dlls and exe file needed for the Windows Service installation.
- Also, I removed all actions from AppCompat and added a new Custom Action - call the same PowerShell script for calling by bat file. I pass the parameter to the bat file - the new location of the subfolder under LocalApplicationData.

The second problem is: new synchronized folder under the LocalApplicationData never created during the installation.

- My custom action execution time set to - After the system has been successfully modified... Also, run under the LocalSystem account with full privileges Execution stage - install... Calling the bat file is no problem at all - problem is - folder is never created...
- synchronized subfolder has a check - Create folder on target machine...

What I'm doing wrong here?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Msix: windows service installation

Hi and welcome to our forums,

We apologize for the delayed reply on this.

Could you just follow our "Windows Services for MSIX" video tutorial steps and see if this helps you successfully deploy and install your service through the MSIX package.

This should be enough to get the service installed.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ghostbob
Posts: 3
Joined: Tue Aug 11, 2020 7:20 am

Re: Msix: windows service installation

After watching your video, did exactly as it was shown, but I don't see any difference. The service(2nd exe file) is not installed on the machine...
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Msix: windows service installation

Hi,

Could you share with us by email at support at advancedinstaller dot com the .AIPs (setup project) files of your MSI and MSIX packages and also a download link for the MSI and MSIX built packages so we can try to run a few tests and investigations on our side?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”