## Saturday, February 18, 2017

### Stopping the Windows Device Portal at runtime

In another of my series of "questions I asked in a forum and didn't really find a good answer to", I was looking for a way to stop the Windows Device Portal.

In Windows 10 IoT Core, the Windows Device Portal is a build time feature.  I wanted the option to possible enable it in a production, locked down, device without having the user reimage the device.

The Windows Device Portal is hosted in a Windows Service called WebManagement.  To stop it, run this command:
sc.exe stop WebManagement
Knowing it can be managed via SC, I can set the startup to Manual and only start it when I need it.  I also need to enable a user account to login, since I don't actually have an enabled account on my retail build.

## Friday, February 17, 2017

### Submitting a Headless App to the Windows Store

I recently ran across an issue when submitting a headless app for Windows 10 IoT Core to the Windows Store.

Basically, you have to include a dummy UWP app in the solution so you can pass the automated Store checks.  In my case, I was greeted with a nice message:

"An executable image named '<APPNAME>.winmd could not be found in <C:\Projects\<APPNAME>\obj\x86\Release\ilc\in".

Posting in forums didn't come up with anything, so I ended up opening a support incident, which yielded a simple workaround:

Add the EXE to a folder in the solution and it will build (instead of at the root like the instructions state).
In the Package.appxmanifest, ensure you specify the folder in the Application node:
    <Application Id="App" Executable="EXE\DummyApp.exe" EntryPoint="DummyApp.App">

In my case, the blank UWP app is in a folder named "EXE".  I also specified "Copy to Output Directory" as "Copy Always"

Update:  I figured I should post a little bit more context.  This is the guidance for publishing IoT Core apps to the Windows Store to have it update your apps automatically.  To submit the app, it must be compiled in Release mode.  Release compiles with a checkbox enabled called "Compile with .NET Native tool chain", which appears to have a bug when you include an EXE at the root of a project.

The best part is that the only reason to do all of this is to pass the automated submission checks.

## Wednesday, February 15, 2017

### Windows 10 IoT Enterprise Lockdown Settings

Alternate Title: Learn This Neat Trick to Block Edge Gestures

If you happened to use Windows Embedded 8.1 Industry on a POS/Digital Signage Player/kiosk, you are probably looking for the same features in Windows 10 IoT Enterprise.

Most made it over.  The biggest change, which I get asked about most, is the Gesture Filter.  With the initial release of Windows 10 IoT Enterprise, there was no way of suppressing the side swipe gestures without terminating explorer.exe.  With 1607, there is a new policy that actually works.  It appears that this policy does not work with Windows 10 Home/Pro, which I typically don't mind because they are just not good for embedded devices.

Since it seems to be hard to find, this is the registry key that corresponds to the policy:

REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\EdgeUI” /V  AllowEdgeSwipe /T REG_DWORD /D 0 /F

## Monday, February 6, 2017

### Deploy a FFU Image using DISM

Run the following command to get a list of disks on the system:
wmic diskdrive list brief'

To apply the image to the disk run:
DISM /Apply-Image /ImageFile:.\flash.ffu /ApplyDrive:\\.\PhysicalDrive0 /SkipPlatformCheck

Where .\flash.ffu is the FFU in the current directory and PhysicalDrive0 is the drive you identified in via wmic.  Be careful, you can reimage your USB boot media using this method without warning.