Skip to main content

Notifications

Dynamics 365 Community / Blogs / AX for Retail / Mass deploying Commerce Sea...

Mass deploying Commerce Sealed Installers

Introduction

Here I will go through basics of leveraging Microsoft Intune to deploy Commerce Sealed Installers in a mass fashion and will not go through details of enrolling into Intune since it is well covered by the Intune's documentation. Given all Sealed Installers are .NET based Console Applications, all of them will be Intune deployed by relying on Win 32 apps.

I will go through the deployment of Base Installers but the same steps can be reused to deploy the Extensions.

Store Commerce app

Packaging the application

1. Download the require version of the Store Commerce Base Installer from LCS Shared Asset Library, I will use the version 10.0.27:

6646.pastedimage1659996765544v2.png

I will place the file into the folder C:\Temp\Intune\Installer_10.0.27.

2. Download IntuneWinAppUtil.exe as explained in Prepare Win32 app content for upload into the folder C:\Temp\Intune.

3. Run the utility:

IntuneWinAppUtil -c Installer_10.0.27 -s StoreCommerce.Installer.exe -o IntunePackages\10.0.27

Upon successful completion:

5367.pastedimage1659998575837v3.png

it will generate the file StoreCommerce.Installer.intunewin in the folder C:\Temp\Intune\IntunePackages\10.0.27

Uploading the application

1. Navigate to https://endpoint.microsoft.com/  and click Apps -> Windows -> Add.

2. In the combo box App Type select Windows app (Win32) and then hit Select button.

3. Click the link Select app package file StoreCommerce.Installer.intunewin from the folder C:\Temp\Intune\IntunePackages\10.0.27 and hit OK button.

4. Now we need to populate required fields with data if they are not populated yet. Unless you want to change - leave default values in the pre-populated fields. I will keep defaults and will provide Contoso for the Publisher and 10.0.27 for the App Version. This is how the tab App Information looks like with all required fields populated:

8446.pastedimage1659999646394v5.png

Once you hit Next button the wizard will advance to the Program tab.

5. In the Install field type:

StoreCommerce.Installer.exe install --Verbosity Trace

   In the Uninstall field type:

StoreCommerce.Installer.exe uninstall --Verbosity Trace

6. For the Install Behavior field I will use the value User. Keep the rest defaults

pastedimage1660031730219v1.png

and hit Next button to switch to the Requirements tab.

7. For the Operating system architecture select 64-bit. 

8. For the Minimum operating system I will select Windows 10 1803 based on the prerequisites.

5775.pastedimage1660000702075v7.png

Hit Next to switch to the Detection Rules tab.

9. In the Rule format select Manually configure detection rules -> Add -> (Rule Type)->Registry

10. In the Key Path paste: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dynamics\Commerce\10.0\Store Commerce\Configuration

11. In the Value name type: InstallationRootDirectory

12. In the Detection method select Value exists. Leave the rest with the defaults:

4237.pastedimage1660001216646v1.png

Hit OK -> Next.

13. The Intune enabled machine I use already has all the prerequisites so I will make no changes at the Dependencies tab but if your situation is different you might want to setup this tab by following the embedded documetnation. I will also make not changes at the next tab - Supersedence (preview).

14. At the Assignments tab I will configure the app as required for all users by clicking the link Add all users under the Required section:

7485.pastedimage1660001722406v3.png

And will keep default values for the rest. This will effectively make the Store Commerce app required for all users.

15. At the Review + create tab make sure everything has the values you expected and if so hit Create button.

This is the Intune documentation explaining setup for Win32 apps in details.

Deploying the application

Once the above application was setup in Intune it will be installed on Windows devices, to speedup the process you can ask a user to re-login, once the user is signed out and then signed-in, wait for few minutes and the app will be downloaded and installed:

StoreCommerceInstalling.png

Upon successful installation there will be proper notification:

StoreCommerceInstalled.png

as well as the application's icon on the Desktop.

Uninstalling the application

If you want to uninstall the application for some or all users, Edit the application's Assignments section and Remove the line you added earlier to the Required section:

5734.pastedimage1660034271821v1.png

Then, under Uninstall section, click a corresponding link, in my case I want to uninstall it for all Users so I clicked "Add all users":

4643.pastedimage1660028644996v1.png

As with the Install, once the machine is restarted, wait for some time once the user is logged in and the uninstall will begin:

StoreCommerceUninstalling.png

Troubleshooting

If anything goes wrong while deploying an application into a machine, you will see warning indicators for a problematic device, to check the deployment status navigate to Home -> Apps and you will be presented with the list of the apps and indications if there are any failures:

2744.pastedimage1660005137113v7.png

Here we can see that I have 2 Applications of type Windows and there are 2 installation failures. Double clicking on the StoreCommerce.Installer will transfer me to that app details:

5468.pastedimage1660004904338v5.png

Double clicking in User status leads to the per-user details:

8547.pastedimage1660005066635v6.png

Lastly, clicking on the user moves us to the details we are looking for:

7080.pastedimage1660005301122v8.png

Revealing the error "The system cannot find the file specified" which might take place if I specify wrong executable file name while providing an Install Command, for instance, that error would be seen if I forget an .exe extension:

StoreCommerce.Installer install

To rectify this issue I need to use the file name with an extension:

StoreCommerce.Installer.exe install

Absent prerequisites

Deployment might fail if the Sealed Installer prerequisites are not installed prior installing the application. For instance, default Windows 10 installations have Restricted Powershell Execution Policy which doesn't allow running scripts but, for instance, StoreCommerce Installer depends on the ability to execute PowerShell script. So, if you will try to deploy StoreCommerce on the machine where the Execution Policy is restricted, the deployment will fail:

0458.StoreCommerceFailed.png

The error in Intune will not really, at this time, bring much insights:

7356.pastedimage1660035159930v2.png

So we will need to look into the log on target machine which is located under %PROGRAMDATA%\Microsoft Dynamics 365\10.0\logs in the folder whose name starts with Store Commerce_. In case of the aforementioned PowerShell Execution Module policy issue the error in the log file will be:

5618.pastedimage1660035547335v3.png

To address it, execute on that machine

powershell Set-ExecutionPolicy RemoteSigned

Comments

*This post is locked for comments