Login AM Tutorials Create And Deploy Package

From Login VSI Documentation
Jump to: navigation, search

This tutorial will show you how to create a package for PowerGUI and how to deploy this package on a computer.

Create the PowerGUI package

Assuming that you already created the environment, we can start creating the PowerGUI package.

  • Select Packages from the navigation panel (left)

LoginAM Tutorials Create and deploy a package 01.png

  • Click New Category in the actions panel (right)

LoginAM Tutorials Create and deploy a package 02.png

  • Enter a name for the package category. E.g. Admin apps and press the Add button

LoginAM Tutorials Create and deploy a package 03.png

  • Select the category we just created from the navigation panel (left)

LoginAM Tutorials Create and deploy a package 04.png

  • Click New Package in the actions panel (right)

LoginAM Tutorials Create and deploy a package 05.png

  • Provide a name for the package. e.g. PowerGUI and click the Add button.

LoginAM Tutorials Create and deploy a package 06.png

  • Select the package we just created from the navigation panel (left)

LoginAM Tutorials Create and deploy a package 07.png


Download the PowerGUI MSI

Download the PowerGUI MSI to the media path (Installdir\Media\PowerGUI)


Set the software media path and install location properties

Now that we have created a package, we should tell Login AM where to find the source files and what the target folder for the installation is.

  • Make sure you have selected the PowerGUI package.

LoginAM Tutorials Create and deploy a package 08.png

  • Select the General Settings tab from the tab bar

LoginAM Tutorials Create and deploy a package 09.png

  • Check the override checkbox next to software media path and set the location to %AM_Files%\media\PowerGUI

LoginAM Tutorials Create and deploy a package 10.png

  • Check the override checkbox next to software install location and set the location to %programfiles%\%am_pkg_name%

LoginAM Tutorials Create and deploy a package 11.png

Note: We will use these properties (%am_pkg_installdir% and %am_pkg_media%) to make our MSI Install action item more variable, thus making it easier to re-use this package in a different environment.

Important: Using %% makes Login AM expand the contents as an environment variable. If you use <> instead of %%, AM will only translate <> to %% and won’t expand the variable as required.

Enable Deployment plugin

By default, all plugins are disabled for new packages. If we want to enable a specific plugin, we do the following:

  • Click the View/Hide plugins button in the tab control

LoginAM Tutorials Create and deploy a package 12.png

  • Select the Deployment tab

LoginAM Tutorials Create and deploy a package 13.png

  • Check the override box for execute deployment actions and set the value to True

LoginAM Tutorials Create and deploy a package 14.png

  • Click the Save button to save the setting

LoginAM Tutorials Create and deploy a package 15.png

  • Click the View/Hide plugin button again to hide disabled plugins from the tab control

LoginAM Tutorials Create and deploy a package 16.png

Create the MSI Install action item

Now that we have set the software media path and software install location we can use these properties in the Install MSI action item.

  • Select Deployment > Actions from the tab controls

LoginAM Tutorials Create and deploy a package 17.png

  • Click the Add button to Add a new Action Set

LoginAM Tutorials Create and deploy a package 18.png

  • Give the action set the name Install PowerGUI and press the save button

LoginAM Tutorials Create and deploy a package 19.png

  • Click Add>MSI Install

LoginAM Tutorials Create and deploy a package 20.png

  • Specify the path to the MSI file (%am_pkg_media%\Powergui.msi)

LoginAM Tutorials Create and deploy a package 21.png

  • Specify the MSI properties (PF_POWERGUI=”%AM_PKG_INSTALLDIR%”)

LoginAM Tutorials Create and deploy a package 22.png

Note: You are not required to use the AM_PKG_INSTALLDIR and AM_PKG_MEDIA environment variables in the action items, but we highly recommend it, so that packages are easily exportable/re-usable in a different environment.

Now that the package is done, we need to add the package to a layer and add the layer to a collection.

Deploying the package on a computer

To deploy the package on a computer, make sure the package is added to a layer, and that layer is added to a collection where the computer is a member of. Make sure that the computer was initialized.

Note: Make sure the deployment plugin is enabled for the collection where the computer belongs to.

To deploy the package on the computer, we first need to update the cache on this computer, so the run time knows it needs to process this package on this computer. We do this by starting PowerShell on the computer and typing:

Import-Module AMClient
Update-AMCache

Now that the cache is updated, we can start the startup event, which will process the deployment.

Invoke-AMEvent -Name Startup

The runtime should start installing powerGUI and will initiate a reboot after it's done (depending on if you have enabled the reboot after deployment setting for the collection)