0

In endeavours as to learn C# and toy with the app-store-like approach too, I now have two applications;

  1. Web TVGuide (WinRT with publically sealed exposed C# classed backed)
  2. A WebTV Player (winforms + WebBrowser/ActiveX) and .

First intentions was to upload #1 (the WinRT) to appstore - and provide a link to #2, hosted on my private page...

But im wondering as to how i would go about merging the two projects under one solution in order to package them together as one. I am betting that this also would remove some of my requirements for WFC Service (IPC) communications.

Structure follows to give a little insight;

enter image description here enter image description here

Can i 'launch' the WinRT TVGuide from my Windows.Forms application - without having to run two setup packages - and call via Process?

1 Answer 1

0

You could ease the future development by having both projects inside the same solution and move all the shared core code (if any) to a PCL project. However, the other plans you have won't really work.

Launching a WinRT application from a Windows Forms application is only possible if the app is already installed on the user's machine. If the application is available, you can launch it using the IApplicationActivationManager COM interface.

I think that your best bet is to count on users installing the WinRT app and then link to the Windows Forms application from an about page or something.

Here's a nice article detailing the use of IApplicationActivationManager:

Launching Windows Store Apps Programmatically


Edit: Upon further investigation, it looks like I might have been slightly wrong. There actually is a legit way to sideload Windows Store applications but it requires jumping through quite a few hoops. However, you should be able to install both the Windows Forms application and the WinRT application with your own installer and then launch the WinRT app like you wanted to.

Here are the quick steps for reference. For a detailed explanation, see Install a Windows 8 Modern UI app without the Windows Store.

Windows 8 and 8.1

  1. Enable Allow all trusted apps to install group policy
  2. Sign the app with a CA that is trusted on the target PC
  3. Run a PowerShell command to install the application. For example Add-AppxPackage C:\app1.appx –DependencyPath C:\winjs.appx
  4. In some cases, enterprise sideloading product keys need to be used. Check out the linked answer for more details on that one.

Windows 10

I also took a look at how it's done on Windows 10, and here are my findings. Microsoft has taken a more relaxed approach on sideloading apps to a Windows 10 installation. Differences to the earlier versions are the following:

  • You can unlock a device for sideloading using an enterprise policy, or through Settings
  • License keys are not required
  • Devices do not have to be joined to a domain

The requirements for sideloading are the following:

  • Devices need to be unlocked for sideloading (unlock policy enabled)
  • Certificate assigned to app
  • Signed app package

And finally here are the steps to take:

  • Turn on sideloading - you can push a policy with an MDM provider, or you can use Settings.
  • Trust the app - import the security certificate to the local device.
  • Install the app - use PowerShell to install the app package.

Take a look at this article for detailed steps on how to achieve app sideloading on Windows 10.

2
  • Hi, thx for your reply.. That is what i had come to realize - and why im laying this question out there.. I just cant believe there isn't some hack available, that will load a dll and start the 'construct' of my winrt UUID
    – mschr
    Commented Jul 28, 2016 at 22:55
  • Looks like I was slightly wrong, I updated my post with new information. You should be able to sideload the app and use it the way you described in the original question. Commented Jul 29, 2016 at 7:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.