Windows App Certification Kit Warning - visual-studio-2010

I have an app that developed for Windows 7 & 8. Developed in VS2010 using C++/CLI. When tried to certify with Windows App Certification Kit, it shows a warning.
Binary analyzer
Warning: The binary analyzer test detected the following errors:
File C:\Program Files (x86)\MyApp\msvcr100.dll has failed the ExecutableImportsCheck check.
File C:\Program Files (x86)\MyApp\msvcp100.dll has failed the ExecutableImportsCheck check.
Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of the customer's computer to malware.
How to fix: Apply the SAFESEH, DYNAMICBASE, and NXCOMPAT options when you link the app.
How can I avoid this warning from my app.

It makes no sense to use WACK on your project. It was made to verify WinRT apps, the kind that are published through the Store and run on Windows 8.x or Windows Phone. They need to be safe to run in a very restricted sandbox that makes a very small subset of the winapi available. Limited for security, deployment and power-consumption reasons, what WACK verifies. A desktop DLL like msvcr100.dll cannot meet them. Such apps are built with another CRT, vccorlibxxx.dll
You cannot build such an app with VS2010, VS2012 or higher required. Nor can it run on Win7. You simply need to stop using the tool.
Update: it does appear that WACK was updated in the 8.1 SDK to also verify Windows Logo requirements for desktop apps. This is obscure. Judging from the command help that's displayed when I run appcert.exe /? in an elevated command prompt, you must first create an installer for your app. Then you can run appcert with the -apptype desktop and the -setuppath yourinstaller.exe to have it perform the validation. Some additional command line options appear to matter, like -appusage. I don't know what they mean.
Do keep in mind that this is only useful if you need the Windows Logo certification. There ought to be additional information in the logo program documentation about this. Consider contacting Microsoft if you have Windows Logo program questions.

Related

VB6 Deployment not working for Second user

I have a VB6 Application that I am deploying using Microsoft Development Environment.
The install package is working for Windows 7/10 32/64 bit.
The problem I am having is if a second user logs into windows and runs the installed app some of the controls are not working.
Forms that contain MSCOMCT2.OCX, TABCTL32.OCX and maybe others fail saying:
"Component ... or one of is dependencies not correctly registered: a file is missing or invalid"
But once again for the user that installed the app all is good.
I see in other installs there is a choice to install for only me or all users. I don't see a way to implement that in "Microsoft Development Environment", is this my problem?
What changes if you install an app for All users?
This may have to do with registry virtualization. The application may be running in some kind of compatibility mode so that the controls are not really being installed system-wide.
I'm not too familiar with those settings but it might be possible to adjust them so that the DLLs/OCX files are genuinely registered for all users and the application runs accordingly. There is a risk that if the compatibility settings were set intentionally, this could break something else.
Hopefully this is a useful starting point.
I will add that IMO installing the application not to require registration whatsoever is a much more robust solution. See How can you force VB6 to use the DLLs and OCXs from the app directory?

How to Create a Full-Trust UWP App?

Using the Desktop Bridge (formerly known as Project Centennial) through the DAC, one can create a full-trust UWP App. I thought this meant you can now create a Full-Trust UWP App and if so, how do you do that?
What I am trying to figure out is what configuration can I manually set on my UWP Project to grant it full-trust.
If you need some background, I need to create an Enterprise tool that has to be UWP. The application is going to be run on my company and one of the features that would make the UX better is to be able to access some parts of the file system outside of those allowed by UWP and preferably without the summoning of a dialog. Being able to run other DLL would also be a big plus; perhaps DLL Hell is desired this time around.
#Anzurio - just stumbled across your question and thought I'd share our experiences building the new Windows Terminal.
We originally set out to create the Terminal as a UWP app, with a nice modern XAML UI, but quickly found that the UWP app platform couldn't support a couple of our key requirements:
1. Terminal must be able to be launched elevated
2. Terminal must be able to launch & connect to arbitrary executables (e.g. cmd, powershell, wsl, etc.)
Because of these limitations, we had to create the Terminal as a standard Win32 process which contains a XAML Island which hosts the Terminal's Tab Bar and Terminal XAML Control instances in the main window frame.
We have taken care to keep as much app lifetime/logic code OUT of the Win32 host as we can, so that we'll have less work to do if/when the app platform does support our requirements and we get to ship a real UWP Terminal apps.
We are working with the app plat team to figure out how we might be able to build/full-trust modern apps more cleanly in the future.
In the meantime, I hope this response helps, and hope the Terminal source gives you some inspiration as to how to craft your own apps.
I don't know such of options. Yes, DAC can contain the Full-Trusted Win32 apps, but it is only applicable for Win32. UWP - WinRT - apps are restricted with App Container.
The alternative option is - using the "Special capabilities".
Special and restricted capabilities
There are many of declarations that overcome the restrictions of sandbox. Some of these are not applicable for store submission - only for in-house deployment apps. Others need registration for Microsoft to deploy with store. If your requirement is matched, you can use it.
(Added - June 2017) From Win10 AU, we can use the "FullTrustLauncher" API to launch the Win32 component from UWP App. But, yes, it does not mean we can run the "UWP" - WinRT process with full-trust rights. It's applicable only for Win32 process. And, the Win32 app executable should be contained in the application's AppX package and the manifest should declare the executable as "windows.fullTrustProcess".
<Extensions>
<desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe">
<desktop:FullTrustProcess>
<desktop:ParameterGroup GroupId="SyncGroup" Parameters="/Sync"/>
<desktop:ParameterGroup GroupId="OtherGroup" Parameters="/Other"/>
</desktop:FullTrustProcess>
</desktop:Extension>
</Extensions>
Full​Trust​Process​Launcher Class

Windows Phone Power Tool (Pre WP-8) Fails To Load Folder Content

My environment : Win7, VS2010 Pro, Windows Phone Emulator 10.1.40219.390, HTC T8788, Windows Phone Power Tool v1.6.
I need to Get multiple files (they are <3kb json files) to my dev box from a folder on my emulator/device. I had been happily doing this with Isolated Explorer command tool and/or Windows Phone Power Tool till the number of files was very limited. As soon as the number of files increased in the folder both the tools mentioned above failed to open the folder from device. The application on device and emulator is handling large number of files as expected (tested with 4000+ files). Following are my findings regarding the issue with WPPT (and IS explorer): if a folder contains more than 1024 files, WPPT does not load the folder. The physical size of individual file in the folder does not matter. The issue can be reproduced with same effect on emulator and device. On further investigation I found that WPPT breaks at a call to Microsoft.SmartDevice.Connectivity.RemoteIsolatedStorageFile.GetDirectoryListing() which just says - "Unspecified error" with no details. It seems the said API method is now obsolete and i could not find any substantial information on MSDN about it or the issue
Did somebody else also encounter this problem? Is there some way I can pull large number of files (4000+) to my dev box from IS folder on device/emulator (please note, i can only work with the environment mentioned above, so Win8 or WP8 emulator are out of question)?
Regards.

Is there a testing conditions checklist for windows phone apps?

I've built a Windows Phone application and was successfully able to get it into the store. I made a few improvements and created a Windows Phone 8 version and submitted the update. However, it keeps failing the certification process (3 times now). I found one issue with the Windows Phone 7.x version and was able to fix that, but now I'm just getting an error that my application fails to run with a silent failure.
I've tried everything I can think of in emulators and devices, but I can't seem to get the failure to happen. It would really be nice if Microsoft would give you more information. Since they don't, I was wondering if anyone had a good list of all the different condition, devices, and steps you go through to test your application before submitting it.
So what are the recommended testing scenarios to test an app in before submitting it to the store?
(What would be really nice would be to see what steps Microsoft uses when they test an app)
BTW - I should mention that I've used the certification tool and the simulation dashboard in my own testing.
Most of the tests used for WP7/WP8 certification are public and can be seen as part of the Windows Phone certification guidelines: App submission requirements for Windows Phone, Technical certification requirements for Windows Phone and Additional requirements for specific app types for Windows Phone. Have a look at the column titled "Test Steps".
Couple of thoughts regarding you specific issue:
Can you share you specific failure report NSTL test results pdf file?
A good way to make sure your second submission goes through is to simply fix the failure from the first submission, and under the "tester notes" say that it's the exact same XAP with one small fix and how it was fixed.
If you can't repro an issue encountered by the testers, you can always resubmit and under the "tester notes" saying just that and ask for more details if it fails again.
The test team may be using 256MB devices (Lumia 610) for WP7 testing and 512MB devices (Lumia 620) for WP8 testing. Have you tested your app in the emulator under those configurations?
We got this problem recently on our two apps on which the another one was an app we did only some text changes. The previous version passed and launced well and the new version did not.
Our reason was very similar as what Bryant tells.
What we did was that after our changes we run the 'Preemptive Solutions Dotfuscator For Marketplace Apps' and upload the dotfuscated xap-file. On our cases the Dotfuscator had changed the size of our own DLL-file (we have our own custom controls for buttons to have two title-lines on the button). At the moment I don't know reason to this but I feel that somehow the Dotfuscator does not found our own DLL properly while dotfuscating (this our DLL is on the References of our project)).
So one reason can be that something goes wrong while dotfuscating. For this reason one should test the dotfuscated xap-file by installing it onto the phone using 'Application Deployment Tool'.
The files and especially the DLL-files inside a yourapp.xap-file can be seen by renaming the file to yourapp.zip and then extracting it.
Tapani

How to install an XAP from the commandline in a windows mobile 7 standalone emulator?

We have installed a windows phone stand alone emulator XDE.exe.
Now we would like to install from the commandline additional windows mobile applications.
For this we used the Smart Device Connectivity API as described in Justin Angel's blog post [1].
This is working fine as long as we have a complete SDK installed.
If we try to install an application on the stand alone emulator we face an error because the datastore is empty [2].
Any idea how the stand alone emulator can be added to the datastore? Or do you know an other approach to install an XAP inside a stand alone emulator?
Thanks for a hint.
Best Regards
Frank
[1] http://justinangel.net/WindowsPhone7EmulatorAutomation
[2] Microsoft.SmartDevice.Connectivity.PlatformNotFoundExceptio
n: Exception of type 'Microsoft.SmartDevice.Connectivity.PlatformNotFoundExcepti
on' was thrown.
Try using the Windows Phone Power Tools. If you download the code you can tweek the WindowsPhonePowerTools.Console to do what you want. Out of the box it seems to have a problem with the way it parses the command line causing full paths to a xap having a ':' on them to not work so well (could be fixed pretty easy though).
To test it out, I copied a xap file to the directory I compiled the WindowsPhonePowerTools.Console to and used the following command line to deploy to the emulator:
wptools.exe -target:emulator -xap:myxapname.xap -install
Try it:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565%28v=vs.105%29.aspx
XapDeployCmd.exe has the following syntax:
XapDeployCmd.exe
The following table describes the command-line options for XapDeployCmd.exe.
Option
Description
Specifies the command to run. This option has one of the following values:
OptionDescription
/installlaunch - Installs and runs the app on the device. This option requires the Xap FileName argument.
/update - Updates the app already installed on the device. This option requires the Xap FileName argument.
/launch - Launches the app already installed on the device. This option requires the Product ID argument.
/uninstall - Uninstalls the app from the device. This option requires the Product ID argument.
/EnumerateDevices - Lists the valid device targets and a numeric index for each device.
- Specifies the GUID of the app. This value is found in the app manifest file for the project, WMAppManifest.xml.
- Specifies the full path of the XAP to be installed or updated.
- Specifies the target device. This option has one of the following values:
xd - Default emulator.
de - Windows Phone device connected to the development computer.
n - The device at index n in the list of devices. To get the list of devices, run XapDeployCmd.exe /EnumerateDevices.

Resources