Introduction
FlexApp has an option to convert MSI, executable installers or scripts to FlexApp packages in batch., without the interaction of a packager. This blog article is about batch conversions.
In this example, the Office add-on Grammarly and Notepad++ 8.2 are converted in batch. Also, in Notepad++ the automatic update option is removed.
Background information
There are 2 components:
-
- Packaging Capture Agent
Is installed on each packaging computer where the installation is captured. The setup of a packaging computer is with a minimum set of applications and no member of a domain. The Capture Agent can be installed on multiple computers, you are not limited to just one. - Primary Packaging Manager
Is installed on a dedicated computer or server. From the Primary Packaging Manager, the packages are created and are the capture agents monitored.
In this example, the Primary Packaging Manager is installed on the domain controller. Not recommended, but it suits my situation.
- Packaging Capture Agent
Installation commands
The installation commands for Grammarly and Notepad++ should be clear. Of course, the installations should be silent. There is no option to interact with the installation. For Grammarly, the silent installation command is GrammarlyAddInSetup.exe /fastforallmode /silent. Notepad++ can be installed silently with the command npp.8.2.Installer.x64.exe /S. But... to remove the automatic update file a modified config.model.xml must be placed in %ProgramFiles%\Notepad++. Also, the folder %ProgramFiles%\Notepad++\updater must be deleted.
To achieve this, I created an install.cmd:
"\\demo-sccm\ProfileUnityFlexApps\NotepadPlusPlus_8.2_ENG_1.0.0\4.Sources\npp.8.2.Installer.x64.exe" /S
copy "\\demo-sccm\ProfileUnityFlexApps\NotepadPlusPlus_8.2_ENG_1.0.0\4.Sources\config.model.xml" "%ProgramFiles%\Notepad++" /y
del "%ProgramFiles%\Notepad++\updater" /s /q
During the installation phase, all the installation sources are copied to the computer running the capture client. If the installation command is a batch file, only the batch file is copied locally. So, in this case, only the installation command install.cmd is copied locally to the agent. Therefore, it is mandatory to run all the commands in the batch file from the original location.
Preparation
Installation of the Packaging Capture Agent
The latest version can be found under FlexApp Packaging Automation software of the Liquidware Documentation. I placed the executable on a dedicated share.
The installation command is: fpa-installer_1.0.25.7900.exe install agent /AgentUsername "fpa_services" /AgentPassword "WhateverPasswordYouLike" /AcceptEULA |
Installation of the Primary Packaging Manager
In this scenario, all the commands are run from my domain controller. In this example, this is my Primary Packaging Manager.
The installation command is fpa-installer_1.0.25.7900.exe install primary /PrimaryUsername "fpa_services" /PrimaryPassword "WhateverPasswordYouLike" /AcceptEULA |
Linking the Packaging Capture Agent and the Primary Packaging Manager
In order to start packaging jobs on the computer running the Packaging Capture Agent, the Packaging Capture Agent and Primary Packaging Manager should be linked. Also, the connection should be verified.
Open an elevated command prompt and go to the folder C:\Program Files (x86)\Liquidware Labs\FlexApp Packaging Automation. Give the command primary-client.exe add agent /PrimaryUsername "fpa_services" /PrimaryPassword "WhateverPasswordYouLike" /AgentAddress https://windows10wkg_02:9074 /AgentUsername "fpa_services" /AgentPassword "WhateverPasswordYouLike" |
And check the connectivity with the command primary-client.exe list agent /PrimaryUsername "fpa_services" /PrimaryPassword "WhateverPasswordYouLike" |
Create the installation file
The installation file is the input file for the package manager and contains all the commands for the package manager. In this example, the installation of both Grammarly and Notepad++ are captured on one PC. To avoid conflicts, a system restore point is created before each installation and applied after each installation. Only dependencies should be installed first. Grammarly uses Office, so Office should be installed first.
For Notepad++: primary-client.exe Add PackagesFile /PackagesFile "%USERPROFILE%\Desktop\PPM\BatchConversion.json" /Name "NotepadPlusPlus_8.2_ENG_1.0.0" /Path "\\demo-sccm\ProfileUnityFlexApps\NotepadPlusPlus_8.2_ENG_1.0.0\3.Production" /Installer "\\demo-sccm\ProfileUnityFlexApps\NotepadPlusPlus_8.2_ENG_1.0.0\4.Sources\install.cmd" The result. |
For Grammarly: primary-client.exe Add PackagesFile /PackagesFile "%USERPROFILE%\Desktop\PPM\BatchConversion.json" /Name "Grammerly_6.8.263_ENG_1.0.0" /Path "\\demo-sccm\ProfileUnityFlexApps\Grammerly_6.8.263_ENG_1.0.0\3.Production" /Installer "\\demo-sccm\ProfileUnityFlexApps\Grammerly_6.8.263_ENG_1.0.0\4.Source\GrammarlyAddInSetup.exe" /InstallerArgs "/fastforallmode /silent" |
Create the password file
All the login details are stored (in hash) in a defaults.json file. This file has to be created once and recreated at any time if something has been changed. A defaults.json is linked to a computer, so if you want to use it on other computers you have to use the command line option /Crypto Aes /CryptoKey "<my-aes-secret-key>".
The command is: primary-client.exe Create DefaultsJSON /DefaultsJSON "%USERPROFILE%\Desktop\PPM\defaults.json" /PrimaryUserName "fpa_services" /PrimaryPassword "WhateverPasswordYouLike" /PathUserName "demo\packager" /PathPassword "S0omeOtherP@ssword" /PuAddress https://demo-sccm.demo.local:8000 /PuUsername "demo\packager" /PuPassword "S0omeOtherP@ssword" The result. |
Creating the packages
The command is: primary-client.exe Create Packages /PackagesFile "%USERPROFILE%\Desktop\PPM\BatchConversion.json" /DefaultsJSON "%USERPROFILE%\Desktop\PPM\defaults.json" /WaitForDone The result. |
You can find all the logfiles in %LOCALAPPDATA%\Temp\Fpa on the computer acting as the Primary Packaging Manager. If there is an error, check the files corresponding with the package name for more details. Some examples: (1) 10:02:22.472 [1] Fatal - fatal error : System.Exception: WINDOWS10WKG_02 - Index and length must refer to a location within the string. (Parameter 'length') WINDOWS10WKG_02 - Index and length must refer to a location within the string. (Parameter 'length') This means that the folder name where the package is stored is too long. Shorten the location or change the name. (2) 15:45:43.175 [1] Info - package_create.Internal.Installer.AdjustArgs Only the installation executable is copied locally. All the other files in the 'Sources' folder are ignored and not copied. So, if using a cmd file use the folder names instead of %~dp0. |
Adding the applications to the ProfileUnity Configuration Management
The applications are automatically added to the Inventory. You only have to link them to the users.
Notepad++ 8.2 |
And Grammarly. |
Testing on the client
And now, testing on the client.
Grammarly has been enabled in Word. |
Notepad++ is found in the Start Menu. |
And no Automatic Software Updates. |
Please, leave a comment if you have any questions.
Other articles in this series:
- [Article 1] - ProfileUnity from LiquidWare: installation and configuration
- [Article 2] - ProfileUnity from Liquidware: deployment predefined application Firefox
- [Article 3] - ProfileUnity from Liquidware: create a FlexApp Application
- [Article 4] - ProfileUnity from Liquidware: FlexApp Package Automation
- [Article 5] - ProfileUnity from Liquidware: create a FlexApp One Package
- [Article 6] - ProfileUnity from Liquidware: integration with Ivanti Workspace Control