Invalid Certificate Windows App - How to fix it? - windows

I compiled an app for windows with cordova. I got the files in the screenshot.
First of all I started the installation file for the certificate. At the end it says that the certificate was installed successfully.
If I open the .appx file now and click "install", I get an error, that says (I translated it into English myself, the original language is German, I poste the original text below):
English translation: Either you have to install a new certificate for the app packet or you need a new app packet with trustworthy certificates. To do so, please contact your system administrator or app developer. A certificate chain was processed but ended with a untrustworthy root certificate (0x800B0109).
original text: Entweder Sie müssen ein neues Zertifikat für dieses App-Paket installieren, oder Sie benötigen ein neues App-Paket mit vertrauenswürdigen Zertifikaten. Wenden Sie sich dazu an Ihren Systemadministrator oder App-Entwickler. Eine Zertifikatkette wurde zwar verarbeitet, endete jedoch mit einem nicht vertrauenswürdigen Stammzertifikat (0x800B0109).
What have I done wrong and how can I fix it?

The solution is, to install the certificate on the "local computer". Then choose the second option (where you can choose the directory where it is saved) and choose the Trusted Root Certification directory.

Related

Windows 10 OOBE Post-Setup: How to allow PowerShell Add-AppxPackage?

regarding a missing AppxPackage error on the last official Win 10 LTSC-Release I want to automatically install it in the post setup of Windows setup processing: Out of Box Experience (OOBE), the first boot UI. Therefore, I have the .appx file and put the following line in the SetupComplete.cmd:
powershell.exe -ExecutionPolicy bypass -Command "Add-AppxPackage %WINDIR%\Setup\Files\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe.appx" >> %WINDIR%\Setup\Files\log.txt
I am able to execute this line manually in a non-elevated PowerShell console but unfortunately, this is not working automatically within the Windows Setup processing as it says in the log (sorry, it is German):
Add-AppxPackage : Fehler bei Bereitstellung. HRESULT: 0x80073CF9,
Fehler bei der Installation. Wenden Sie sich an den
Softwarehersteller. (Ausnahme von HRESULT: 0x80073CF9) Der
Bereitstellungsvorgang Add fr das Paket
"Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe" von der
Installationsanforderung
"Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe.appx" wurde
abgelehnt, da dieser Vorgang mit dem lokalen Systemkonto nicht
ausgefhrt werden darf. HINWEIS: Wenn Sie weitere Informationen
wnschen, suchen Sie im Ereignisprotokoll nach [ActivityId]
895ecdc3-eb9b-0002-0fcf-5e899bebd701, oder verwenden Sie die
Befehlszeile Get-AppxLog -ActivityID
895ecdc3-eb9b-0002-0fcf-5e899bebd701 In Zeile:1 Zeichen:1
Add-AppxPackage C:\Windows\Setup\Files\Microsoft.VCLibs.140.00_14.0.3 ...
+ CategoryInfo : WriteError: (C:\Windows\Setu...kyb3d8bbwe.appx:String) [Add-AppxPackage],
IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
Why is the local system account not able to install that package?
MSIX/AppX application packages are installed separately for each Windows user account - the app files are extracted to a central system location, but the registration of the app with the system has to be done for each user. I don't know why the Local System account is specifically banned from installing packages, but I can guess why that is so: it doesn't make sense for app packages to be installed for a user account that doesn't even represent a real person, let alone one that can login to the device.
If you'd like the package you're trying to install to be available to all users on the computer, you should "provision" the package using the Deployment Imaging and Servicing Manager (DISM). Provisioned packages will be installed automatically for all existing user accounts the next time they login, and for all newly created accounts on first login.
With DISM's /Add-ProvisionedAppXPackage subcommand (PowerShell version: Add-AppXProvisionedPackage), you can add a provisioned package to the running copy of Windows. I recommend you not do this in OOBE but earlier, in sysprep audit mode:
:: .bat or .cmd batch file would look like this:
Dism.exe -online -add-provisionedAppxPackage -packagePath:X:\whatever.appx
# PowerShell .ps1 script would look like this:
Add-AppXProvisionedPackage -Online -PackagePath X:\whatever.appx
You could also use DISM to provision the package in a Windows installation image (.WIM file) before Windows even gets installed on the device:
:: use Dism.exe -get-wiminfo to find the WIM's "index" number for the Windows edition or custom image you want to change
Dism.exe -mount-wim -wimFile:D:\sources\install.wim -index:1 -mountDir:X:\WimMount
Dism.exe -image:X:\WimMount -add-provisionedAppxPackage -packagePath:X:\whatever.appx
Dism.exe -unmount-wim -mountDir:X:\WimMount -commit
# use Get-WindowsImage to find the index for the image you want to change
Mount-WindowsImage -ImagePath D:\sources\install.wim -Index 1 -Path X:\WimMount
Add-AppXProvisionedPackage -Path X:\WimMount -PackagePath X:\whatever.appx
Dismount-WindowsImage -Path X:\WimMount -Save

How to manually download components for the VS 2017 installation?

While installing Visual Studio 2017 I encountered the error while downloading the JDKV2-Component for Xamarin (maybe someone could edit the English error message in?):
Paket "JavaJDKV2,version=1.8.2,chip=x86" konnte von "https://go.microsoft.com/fwlink/?linkid=863182" nicht heruntergeladen werden.
Such-URL
https://aka.ms/VSSetupErrorReports?q=PackageId=JavaJDKV2;PackageAction=DownloadPackage;ReturnCode=0x80072ee2
Details
WebClient-Download fehlgeschlagen: Timeout für Vorgang überschritten
Bits-Download fehlgeschlagen: Fehlerkontext: BG_ERROR_CONTEXT_REMOTE_FILE, Fehlercode: -2145844841
WinInet-Download fehlgeschlagen: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002
Betroffene Workloads
Mobile-Entwicklung mit .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.27128.1)
Mobile-Entwicklung mit C++ (Microsoft.VisualStudio.Workload.NativeMobile,version=15.0.27005.2)
Mobile-Entwicklung mit JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.27019.1)
Betroffene Komponenten
Android SDK-Einrichtung (API-Ebene 23) (globale Installation) (Component.Android.SDK23,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 19 und 21) (Component.Android.SDK19,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 22) (Component.Android.SDK22,version=15.0.27128.1)
Google Android-Emulator (API-Ebene 23) (globale Installation) (Component.Google.Android.Emulator.API23.V2,version=15.0.27128.1)
Java SE Development Kit (8.0.1120.15) (Component.JavaJDK,version=15.0.26403.0)
Same for the x64-version of the JDK.
It turned out that the Oracle-Website needs a License-Accepted-cookie to download the files. While Microsoft seemingly tried to add it to the download routine it doesn't work for me and the installation won't proceed beyond the point where it tries to install the JDK.
So I downloaded the files manually. But where do I have to put them so that the Visual Studio installation knows that it won't need to download them again?
While searching the web for some hours I finally found the solution here:
https://developercommunity.visualstudio.com/content/problem/160625/packageidjavajdkv2packageactiondownloadpackageretu-5.html
Turns out you have to search for the following folder:
C:\ProgramData\Microsoft\VisualStudio\Packages
There you create a subfolder with the package name as written in the error message/error log (in my case "JavaJDKV2,version=1.8.2,chip=x86") and put the manually downloaded .exe file in there.
Restart the VS-installer and start the installation process.

Visual Studio 2015: access denied on FeedCache

when I try to open a project in VS 2015 I get the error "Access denied" on a File located in ‪C:\Users\XY\AppData\Roaming\Microsoft\VisualStudio\14.0\FeedCache .
The german message is "C:\Users\XY\Documents\Visual Studio 2015\Projects\App1\App1\App1.csproj : error : Der Zugriff auf den Pfad "C:\Users\XY\AppData\Roaming\Microsoft\VisualStudio\14.0\FeedCache\Feed-969FF52C4894C164-File.xml" wurde verweigert."
Some hours ago I restarted my computer for system updates and immediately after that I installed the english language pack for VS.
So I navigated to that FeedCache folder. For that Folder I have all permissions an the security settings grant me al privileges even for inherited files and folders (screenshot). But when i, for example, try to rename a file inside that FeedCache folder, I get a access denied Message. So for me it seems to be a matter of wrong previlegs.
I've tried to disable Inheritance for the FeedCache Folder and the to re-enable it. But I get an error during enableing (screenshot).
Kim

Wrapped .exe with launch4j and jdk8 takes very long to start. Using jdk7 instead starts almost instant

I have the following problem:
I used to have a launch4j config to create a wrapped executable from my runable jar using a bundeled jdk/jre7 for quite some time.
The Programm (launched with that .exe) starts almost immediatly with jdk7.
I now had to switch to jdk8 which results in a VERY slow startup. Everything works just fine, that is not the problem, but the launch process of that .exe takes ~1-2 Minutes and I simply don't get why.
Starting the application from within eclipse (using the same JDK8) it starts within seconds again (as it should!).
So... Any ideas what might cause this and how I can fix it?
Here is my current l4j.xml:
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>C:\Users\user\workspace\DataUpdater\release\bin\DataUpdater-v2.6.1.jar</jar>
<outfile>C:\Users\user\workspace\DataUpdater\release\DataUpdater.exe</outfile>
<errTitle>DataUpdater: Kein kompatibles JRE gefunden</errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>high</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl>https://www.google.de/</supportUrl>
<stayAlive>true</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>C:\Users\user\workspace\DataUpdater\res\icons\DataUpdater.ico</icon>
<singleInstance>
<mutexName>DataUpdater v2.6.1</mutexName>
<windowTitle>DataUpdater v2.6.1</windowTitle>
</singleInstance>
<jre>
<path>./bundeled/jre1.8.0_92</path>
<bundledJre64Bit>true</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.8.0</minVersion>
<maxVersion>1.8.0_92</maxVersion>
<jdkPreference>jdkOnly</jdkPreference>
<runtimeBits>64</runtimeBits>
<initialHeapPercent>33</initialHeapPercent>
<maxHeapPercent>80</maxHeapPercent>
<opt>-Dfile.encoding=UTF-8</opt>
</jre>
<versionInfo>
<fileVersion>2.6.1.0</fileVersion>
<txtFileVersion>v2.6.1</txtFileVersion>
<fileDescription>DataUpdater: Anwendung zum aktualisieren von -Datensätzen mittels externer Datenquellen wie Excel-Tabellen direkt auf Datenbankebene.</fileDescription>
<copyright>Max Mustermann</copyright>
<productVersion>2.6.1.0</productVersion>
<txtProductVersion>v2.6.1</txtProductVersion>
<productName>DataUpdater</productName>
<companyName>Max Mustermann</companyName>
<internalName>DataUpdater v2.6.1</internalName>
<originalFilename>DataUpdater.exe</originalFilename>
</versionInfo>
<messages>
<startupErr>DataUpdater konnte nicht gestartet werden. </startupErr>
<bundledJreErr>DataUpdater erwartet ein bundled JRE. Dieses wurde nicht gefunden oder ist beschädigt.</bundledJreErr>
<jreVersionErr>DataUpdater benötigt eine Java Laufzeitumgebung. Diese konnte nicht gefunden werden.
Bitte stellen Sie sicher, dass Java 8 auf Ihrem System installiert ist.</jreVersionErr>
<launcherErr>Die Windows Registry verweist auf eine nicht mehr vorhandene oder beschädigte Java Installation.</launcherErr>
<instanceAlreadyExistsMsg>DataUpdater wird bereits ausgeführt.
Es ist immer nur eine DataUpdater-Instanz gleichzeitig erlaubt.</instanceAlreadyExistsMsg>
</messages>
</launch4jConfig>
Edit:
The executable reacts the same on many different machines so it is not related to my local environment...
Additional Info:
I just noticed, that launching the application from the jar directly instead of the executable results in the same slow startup.
So this MUST be related to the jdk8 somehow and not to l4j.
What I do not understand is why it starts so fast from within eclipse using the same jdk8.
After a long research without any good result i noticed, that this "hang up" is not related to launch4j & Java 8 but related to log4j and Java 8.
Still not clear what excatly causes this but it is the topic of another question.

Problems deploying a cordova app to a real Windows Phone 8.1 device

I have serious issues deploying my Cordova app to my real Windows Phone 8.1 (Nokia Lumia 6.3). I run Windows 8.1 Pro on a VirtualBox VM and Visual Studio 2013 Update 4 is installed. Building the app worked like a charm but running...
cordova run windows --device -- --phone
... leads to the following error messages:
Deploying phone package to device:
C:\Users\TestUser\Kunden\company\testproj\produkte\sencha-cordova\cordova\platforms\windows\AppPackages\CordovaApp.Phone_0.0.1.0_debug_Test\CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle
Installing application
Fehler: Dieser Vorgang wurde wegen Zeitüberschreitung zurückgegeben. (english: "The process aborted due to timeout.")
ERROR: Error code 2148734208 for command: C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\AppDeployCmd.exe with args: /install,C:\Users\Marco\Kunden\company\testproj\produkte\sencha-cordova\cordova\platforms\windows\AppPackages\CordovaApp.Phone_0.0.1.0_debug_Test\CordovaApp.Phone_0.0.1.0_AnyCPU_debug.appxbundle,/targetdevice:de
ERROR running one or more of the platforms: Error: C:\Users\TestUser\Kunden\company\testproj\produkte\sencha-cordova\cordova\platforms\windows\cordova\run.bat: Command failed with exit code 2
You may not have the required environment or OS to run this project
I already registered the phone as a developer phone using phonereg.exe, so that's not the problem. Also the phone is listed under "My computer" as "Windows Phone".
Also running on device out of Visual Studio 2013 doesn't work. Here the error message is:
Fehler 1 Fehler : DEP6100 : Beim Bootstrapping ist in Stufe 'Verbindung mit Gerät wird hergestellt' der folgende unerwartete Fehler aufgetreten:
SmartDeviceException - Dieser Vorgang wurde wegen Zeitüberschreitung zurückgegeben. CordovaApp.Phone
Fehler 2 Fehler : DEP6200 : Boostrapping für 'Device' fehlgeschlagen. Das Gerät wurde nicht gefunden. Dieser Vorgang wurde wegen Zeitüberschreitung zurückgegeben.
CordovaApp.Phone
In English:
Error 1 Error : DEP6100 : While Bootstrapping ist in Stufe 'Verbindung mit Gerät wird hergestellt' the following exception has been thrown:
SmartDeviceException - The process has been aborted due to timeout. CordovaApp.Phone
Error 2 Error : DEP6200 : Boostrapping for 'Device' failed. The device has not been found. The process has been aborted due to timeout.
CordovaApp.Phone
Has anyone an idea what to do?
When all else fails, try the Tools for Apache Cordova approach -- it does take some work to rearrange your project but in the end you do gain the ability to debug your javascript on the phone (when you finally get it on your phone!).
The downside is that MS does things differently from the Cordova CLI, particularly with respect to plugins. You can still work in the CLI (the files are in bld/Debug/Platforms/windows) if you need to overcome some of the automation that VS + Tools for Apache Cordova supplies.

Resources