Side-loading for LOB Apps in an Organization

As mentioned earlier, the main alternative to the Windows Store is side-loading of apps. That process is simpler in some respects than placing an app in the store. For example, it isn't necessary to supply the information that people need when shopping in the store.

Keep in mind, though, that you can distribute your line of business apps through the store if you like. The benefits of the store, such as the updating pipeline, are then available to you. The Windows Store includes a Business category for such apps. However, if you have an IT department that desires a higher degree of control over the app, then side-loading is probably the option that you want.

Packaging and Validation

For a side-loaded app, you can use the same process shown earlier for packaging and validating the app with the Windows App Certification Kit. The principle additional requirement for side-loaded apps is that the app must be signed.

This requires a valid certificate, and the Publisher Name in the certificate used to sign the app must match the Publisher Name in the package manifest for the app. Discussing acquisition and deployment of certificates is beyond the scope of this book, but in any large organization, it's likely that you have IT personnel familiar with certificates.

You can use a special certificate provided by Visual Studio to test the application internally. The certificate is generated when your project is created. The file name for the certificate is constructed from the project name plus “TemporaryKey,” and the file has an extension of .pfx. There's nothing stopping you from using that certificate to deploy the app as broadly as you like, but that is not recommended.

To supply a different certificate for signing, open the Package.appmanifest item in the Solution Explorer, and select the Packaging tab at the top of the dialog. The screen will look like Figure 20.10. The dialog contains a button with “Choose Certificate…,” which is highlighted in Figure 20.10.

Preparing Client Machines for Side-loading

Once your app is signed and you have located the packages for any dependencies of your app, the next step is to prepare the Windows 8 client machines that will receive the side-loaded app. There are two requirements for client machines that need to receive side-loaded apps:

1. The appropriate certificate must be installed locally. This is the certificate used to sign the app. Again, your IT staff should be familiar with the nuances of managing certificates, so this chapter doesn't discuss that process further.
2. Either the client machine must have a Group Policy for “Allow all trusted apps to install” or, if Group Policy is unavailable on the client machine, the following registry setting must be made:
HKEY_LOCAL_MACHINESoftwarePoliciesMicrosoftWindowsAppxAllowAllTrustedApps = 1

Figure 20.10 Selecting a different certificate for signing the app

20.10

There is one last requirement, but it varies based on which version of Windows 8 is in use on the client machine and whether the client machine is on a domain. For Windows 8 Enterprise Edition and Windows 8 ARM Edition, if the machine is on a domain, the client machine is ready for side-loading. For other editions, or for client machines not on a domain, a script must be run on the client machine. At the time this is being written, the script and the process for running it is not yet available.

The Side-loading Operation

Once the prerequisites for the client machine are accomplished, the actual side-loading operation is simple. From a PowerShell command prompt that is started with “Run as Administrator,” just use a command similar to this:

add-appxpackage C:MyDeploymentDirMyAppName.appx

The .appx package is the one that was generated during the earlier packaging operation. The same command is also used to deploy updates.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset