How can I create Windows 8.1 applications and then deploy them with System Center 2012 R2 Configuration Manager ?



You now have the ability to develop your own applications and then deploy them to new exciting operating systems thanks to the recent releases of the following products:


  • System Center 2012 R2 Configuration Manager
  • Visual Studio 2013
  • Windows 8.1
  • Server 2012 R2


In this post I’ll show you how to create a quick modern style (formally Metro) test application using Visual Studio 2013 and then add that application into System Center 2012 R2 Configuration Manager and finally deploy it to a Windows 8.1 computer. I assume you’ve already downloaded and installed Visual Studio 2013 on Server 2012 R2, you could install it on a Windows 8.1 computer if you wish, in fact that is a necessary minimum operating system level if you want to develop for Windows 8.1.


visual studio options.png


For your reference I used en_visual_studio_ultimate_2013_x86_dvd_3009107.iso available on MSDN.


Note: I’m not a developer, I’m doing this to give you some ideas about using modern style apps in Configuration Manager 2012 R2.


Step 1. Download and extract the Windows 8.1 app samples


Microsoft provides a whole bunch of example code/applications that you can use to create your first masterpiece. Download them from here and extract them locally. I downloaded the full zip package and extracted it to D:\Windows 8.1 app samples like in the screenshot below


windows 8.1 app samples.png


Step 2. Import an Application into Visual Studio


Start Visual Studio 2013, if this is your first time it may be a bit overwhelming, don’t worry you’ll soon get some action. I’d recommend a high resolution monitor for this type of work.


visual studio.png


I’ve already signed in with my Microsoft Live account so you can see my name in the top right corner.


Click on file and choose Open, Project/Solution


file open project solution.png


select a sample app from the list of 250 or so apps, I’ve selected Lock screen apps sample below


Lock screen apps sample.png


and select the C# folder within and then select the .csproj file within that folder (LockScreenApps.csproj) and click on Open


lockscreenapps csproj.png


If you don’t have one already, you will be prompted to get a Developers License (it’s free). So go ahead and get one.


get a developer license for Windows 8.1.png


and after signing in to your live account you’ll get the license…


you now have a develop license for Windows 8.1.png


Your first project is loaded and you’ve got a developers license !


Step 3. Build and then Create app packages


We’ve got the code, let’s build it. Click on Solution Explorer to the right to expand that menu if it isn’t already expanded.


solution explorer.png


Right click on your app listed in Solution Explorer and choose Build (or rebuild if trying again….)


any messages about the build will be reflected in the output window


build output.png


Now that it has built the code, right click the application and choose Store, then Create App packages.


create app packages.png


select No when asked do you want to upload to the Store (Windows store), we are only testing after all…




leave the output location as default and click on Create, note that you can change the version number of the application here, cool 🙂


select and configure packages.png


and if all goes well you’ll be informed that it’s done


package creation completed.png


Step 4. Create a GPO for Deploying Windows 8.1 apps


In Active Directory start up Group Policy management (gpedit.msc) and choose to create a new Group Policy Object


create a GPO in this domain.png


give it a suitable name


windows 8.1 apps.png


and once done right click and choose Edit


edit gpo.png


In order to deploy an appx app (modern style app) via Software Center certain requirements must be met on the client, and these can be done via Group Policy. So expand


Computer Configuration, Policies, Windows Settings, Security Settings, Public Key Policies,Trusted People


right click and choose import to import the needed certificate for each app you want to deploy,


import certificate to the store.png


browse to the CER file located in the AppPackages directory that you just built the app in (see screenshot below)



lockscreen cer file.png


make sure you are placing it in the Trusted People Certificate Store, click your way through the wizard


The certificate appears, note the expiration date, when it expires you’ll no longer be able to deploy the app with that certificate.

cert expiration date.png


Next, set the following setting in the GPO


Computer Configuration, Administrative Templates, Windows Components, App Package Deployment,

Allow all trusted apps to install (Enable)


If you don’t have that setting then you’ll need to import it by logging on to a Windows 8 computer, copy the admx file from Windows 8 to %logonserver%, Logoff Active Directory, Logon AD, run gpedit.msc and the new templates are there.


allow trusted apps to install.png


the finished GPO should look like this


finished gpo settings.png


Step 5. Copy the new app to Configuration Manager 2012 R2


Copy the new application to your sources share on the Configuration Manager server.


copy app.png


Step 6. Create and deploy the application in Configuration Manager 2012 R2


In the Configmgr Console expand Software Library and Applications, choose Create Application.


create application.png


select Windows app package (*.appx, *.appxbundle) from the drop down menu


windows app package.png


point to the appx file in the files we copied in Step 5 above


appx file.png


continue through the wizard until completion.




I won’t go into details about Deploying the app as it’s the same process as any application, just right click and choose deploy, go through that wizard…


Deploy Appx app.png


make sure to to Deploy it to a Device collection that contains our Windows 8.1 computer, make it an available (optional) deployment. and to distribute it to your distribution points.


deploy software wizard.png



Step 7. Test the new app on a Windows 8.1 computer


Logon to a Windows 8.1 computer and open software center, you should see our new app, click Install.


lockscreenapp in software center.png


after a few moments if it fails with The software change returned error code 0x800B0109 like in the screenshot below,


failure is an option.png


then make sure to update Group Policy like so…

gpupdate /force

gpupdate force.png


then try again. This time it will work 🙂




and there it is on the Start screen !


on the start screen.png


click on it to see what happens


lock screen apps.png


cool or what !


until next time, adios !



Related Reading


Windows 8.1 app samples – http://code.msdn.mic…yle-App-Samples

Get a Developers License – http://msdn.microsof…(v=vs.110).aspx

Planning to Deploy Windows 8 Apps in Configuration Manager – http://technet.micro…y/jj822984.aspx

This entry was posted in ConfigMgr 2012. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.