UWP's 'Add-DevAppPackage' Powershell script checks for a developer licence. This is an issue for Sideloading? - powershell

I'm developing a LOB (Line-of-Business) UWP project, we're hoping to distribute the app as a .appxbundle file, alongside a .cer and a Powershell script. This is what is generated in the package for you when you generate a bundle from Visual Studio by selecting Project->Store->Create App Packages...
The problem I have is that the Powershell script, Add-DevAppPackage.ps1, has a check for a developer licence in it. Specifically it calls the powershell cmdlet Get-WindowsDeveloperLicense. If this doesn't return anything it sets a variable which eventually calls Show-WindowsDeveloperLicenseRegistration which shows a popup forcing the user to put their Windows 10 device into 'Developer Mode'. If the user doesn't do this, then the Script fails and the user can't install the app.
If we remove this check for a Developer Licence, the script acts as I'd expect and Installs the App, alongside the certificate, with no issues when the Windows 10 machine is either set to 'Sideload Apps' or 'Developer Mode'. The problem now arises when the users device is in the mode of 'Don't use developer features'. The script crashes.
Is there a way of finding out if the current device is in 'At Least' Sideload apps mode, and if it isn't, show a dialog to prompt the user to enable it?
Currently users have to enable Developer Mode to be able to sideload an app, which I'd prefer they didn't have to do. I'd fully expect users to only have to enable 'Sideload apps'

Is there a way of finding out if the current device is in 'At Least' Sideload apps mode, and if it isn't, show a dialog to prompt the user to enable it?
AFAIK, there is no way to detect whether the Sideload apps mode is enabled for now. And we have no access to show a dialog to prompt the user to enable the sideload apps.
The problem now arises when the users device is in the mode of 'Don't use developer features'. The script crashes.
This is because when install apps in Sideload apps mode, you need to install the app with its trusted certificate. All UWP apps must be signed with a certificate.
Currently users have to enable Developer Mode to be able to sideload an app, which I'd prefer they didn't have to do. I'd fully expect users to only have to enable 'Sideload apps'.
Before create the package of your project, you can open the manifest file and in the Packaging lable:
Here you can choose which certificate to use to sign your app. If you don't want to modify this, it's OK, cause when you packaging your app, a certificate file will automatically generated, and you said you are hoping to distribute the app as a .appxbundle file, alongside a .cer and a Powershell script. In Sideload apps mode, the Powershell script file is not needed. You can just copy the .appxbundle file and a .cer file, and
Enable the Sideload apps mode.
Click the .cer file to trust this certification.
Click the .appxbundle file to install your app.
When the Sideload apps mode is enabled, please don't use .ps1 file to install the app.

Related

Installing a Windows Mobile application on a Windows CE device

A client has asked us to "revive" an old Windows Mobile application that is used by their receiving department.
At some point they wrote a custom Windows Mobile 6 app for Windows CE devices (a Motorola MC55A to be specific).
They have a project in place to replace this app - but it won't happen for a bit and they want to install the custom app on some newly refurbished devices they found as an interim solution.
I found the source code for the application. It even contains an installer project that generates the CAB files.
What I do not know how to do is get the compiled app and installer onto the device.
I am using one of their legacy computers to build the app and connect to the device. The computer has Windows Mobile Center installed and when I see the device connected - I the ability to add / remove programs on the device.
Not sure if this is the route I should be going. Ideally I want to put the installer behind a web page and just have each device download the installer to install the app.
This stuff is pretty dated - I am having a hard time on the specifics of deployment.
You can put the CAB file on the device and launch it manually using the file explorer on the device to install the files.
Some industrial devices like Honeywell, Intermec, Motorola, Symbol, Zebra and others support the auto install of cab files, if the files are put in a special folder on the device. For former Intermec Honeywell devices, this folder is called \Flash File Store\CabFiles. If a cab file is placed in this folder, it will be installed on the next reboot.
You may also put a link to the CAB file on a web site and open that web site within the Internet Explorer on the device. The device will ask for the installation, when the file link is tapped. Please note that some web server like IIS by default block CAB files from being loaded! If so, you need to configure the web server to allow cab file downloading.
Many months later, but I wanted to answer this for future reference, when you DEPLOY Solution, Visual Studio (2008 was the last one supporting windows mobile apps) will ask you for a target device or emulator, here you can select the device and it will be installed, there will be no entry in add/remove programs on the device unless you install it via an installation CAB. You must create an "Smart Device Cab Project" and configure it for your solution.

How to get emulator to stop demanding certificates

I've managed to get the emulator in the WTK to run stand-alone, as a QwertyDevice, and to install apps (with the built-in Install Applications app) from the Apache server on my laptop. However, it's refusing to actually run the apps because it can't find a Certificate (or the Certificate is corrupted).
How do I turn that off? My actual phone, which I'm developing my apps for, warns me but lets me install and use unsigned apps. And I think I can trust my own apps since I'm writing them.
I found mention of a security Xdomain setting in the WTK user guide, and tried the default, trusted, untrusted, and minimum. No effect except a message in the Command Prompt window saying that it's running in the selected domain. It still refuses to run my apps. (Selecting -Xdomain:help in an attempt to get a list of valid domains resulted in "Running in the help domain"!)
How do I get the emulator to OBEY ME and run the apps?

Kiosk Mode on non-managed Chromeboxes?

I'm trying to turn on Kiosk mode for an non-managed chrome box following the official instructions but when I'm on the chrome://extensions page in developer mode there is no Add kiosk application option.
Did this get removed at some point leaving kiosk mode only available to managed devices?
Edit
The kiosk mode app I was using was a simple one that I wrote and had loaded via the "unpacked extension" box on the extensions page.
Then I published it restricted to test accounts and included the account on the chromebox as a tester and loaded it from the chrome web store that way. The effect is the same and I still don't see the kiosk application options.
Double Edit
I published it unlisted and installed it. The app installs and works. I have "kiosk_enabled" : true in my manifest and I still don't see any kiosk mode option.
Got the manage kiosk button to show up by:
Removing other users. The first user on the machine is designated the owner. I was trying for kiosk mode from the second user.
Restarting the device
After the reboot the Manage Kiosk Applications button was enabled. The solution is hinted at in this bug from 2014: https://code.google.com/p/chromium/issues/detail?id=385943

windows mobile 6 emulator not signed with a trusted certificate error

I´m trying to install a program in the windows mobile 6 emulator, running it as standalone image (PPC_USA.BIN). The program installs sucessfully, but when i try to run it, the error msg is:
The file '' cannot be opened. Either is not signed with a trusted certificate, or one of its components cannot be found. If the problem persists, try reinstalling or restoring the file.
Any suggestions?
The application probably requires that security be lowered. So to be able to run it, the device needs to have security lowered at least to the level at which the user is asked for permission when he/she is running an unsigned executable. In the context of Windows Mobile security, it means that the device's security configuration needs to be set to Two-Tier-Prompt, One-Tier-Prompt or Security-Off (see MSDN for more details).
Changing of the security configuration might require device manufacturer's or operator's assistance.
In some cases it can be done by the user. Some of them are listed below:
If the user has a registry editor application which can run on
the device and can change the device registry (such application
needs to be signed by a certificate which is trusted by the device
though, or the same issue will repeat itself.)
The device has installed Microsoft Windows Mobile development
certificates.
The device allows the user to install the Microsoft Windows
Mobile development certificates.
Of the above, 2 and 3 are more than likely be the case; if so then try the following:
Install Windows Mobile SDK (Here)
Install <WM SDK>/Tools/Security/SDK Development
Certificates/Certs.cab on the device.
Go to <WM SDK>/Tools/PocketPC/Security/Security Configuration and
use one of the cpf file to change the device's security
configuration (see the Readme File located at <WM
SDK>/Tools/PocketPC/Security/Security Configuration/ReadMe.txt)
Hope this helps someone, even-though I'm a year or so late...

The debugger was unable to find the registration for the target application

I am testing my Windows 8 app by logging in as the guest account. I want to see how it works installing with limited permissions.
It seems I cannot debug any apps. Here are the steps:
Login as the Windows 8 Guest Account
Open Visual Studio.
Create a new Windows Store app, using the grid template
Click the play button to deploy to the simulator or the local machine.
Upon deployment, I receive this error:
Unable to debug Windows Store app App1/App1/bin/Debug/App1.exe
The debugger was unable to find the registration for the target application. If the problem persists, try uninstalling and then reinstalling the application.
Am I unable to deploy apps without being an administrator? If not, is there a way around this problem?
It doesn't make sense to try to debug installing an app as a guest. Guest accounts are not allowed to install apps. There is a short forum post regarding accounts here.
If you are wanting to see how the app performs for a guest after it has already been installed, you can run the app from the desktop tile, but I don't know how to run the debugger on it, or even if you can.