How to run .exe inside a Universal App in Win 10 in VS 2015? - exe

I know that System.Diagnostics.Process is not available in Universal App. How do we start a locally stored .exe from an Universal App running in VS 2015?

You cannot run an arbitrary executable directly; you need to use Windows.System.Launcher to launch via registered URI scheme or file type.

Related

Is the Azure Function VS extension opensource?

I'm looking around for the Azure Function VS extension source. Is this published?
I'd like to point the extension at a private build of some of the host and templates for developer testing. Is this possible?
The VS extension itself is not open source but when it comes to running your functions the extension uses the azure-functions-core-tools which are open source.
So if you want to run a customized version of the functions host then you can do this fairly easily by making a build of core tools that includes your custom host. You could run then run that from the command line or you could create a custom launch profile in VS so that when you F5 your function project it runs your build of the core tools. Something like this:

How to convert .msi file for windows 10 UWP apps

I'm working in windows 10 UWP cordova application and my client wants setup as .msi. How could I convert my .appxbundle to .msi?
Is there any proven option to create windows 10 UWP app package as .msi file?
There is no direct way to create msi file.
But you can side load your app. You can find at the end of this article
Packaging UWP apps how to sideload app package. You should run with Powershell file Add-AppDevPackage.ps1 and follow instructions.
Probably, you can create some exe file that could copy files to machine and run this script in Powershell

Windows 10 UAP App using Boost Thread can't start on phone

I have an app which uses Boost libraries. On Desktop, the Windows UAP application works as expected, however, on phone (real phone or emulator), the app crash on start, and it is not possible to debug.
It seems the issue comes from the boost::thread library.
Here are simple steps to reproduce this issue:
Build boost thread and date_time (date_time seems required to link) from the command line with: b2 --with-thread --with-date_time toolset=msvc-14.0 variant=debug link=static architecture=x86 windows-api=store cxxflags="/AIC:/winrt". Note that "C:/winrt" is a junction to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\store\references" where platform.winmd is (since it seems required to build)
Create a Blank C++ Windows 10 Universal app using Visual studio 2015.
Edit Mainpage.xaml.cpp and add a call to boost::thread like: boost::thread workerThread(workerFunc); where "workerFunc" is whatever function you want. Add the required include file ( #include <boost/thread/thread.hpp> ). In the link option, add boost thread lib.
Now run the app in a phone emulator.
Result: the app will crash at load time.
This happens on real phones with arm CPU too (with boost built with option architecture=arm). This issue can't be reproduced on desktop computers using the same app built for the emulator. Just run the app on your locale machine and it will work.
Am I missing something?
The issue seems to be that Windows UAP projects link by default with library which are not available in phones, like ole32.lib. So it compiles and work on desktop, but crash on phone, and there is no information about which dll creates the issue. Furthermore, the app validation software from microsoft doesn't provide any information about that.
I was also facing similar issue , app works fine in desktop but fails to load in windows phone emulator. I ran the certification toolkit and found out app is using restricted api (CryptGenRandom in advapi32.dll) which boost was using. removing that particular function call resolved issue.

How to build and start a windows 8 metro app from the command line

I can successfully batch build the application with
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe TestApplication.sln /t:Build /p:Configuration=Release;Platform=x64;DeployOnBuild=true
The problem is how to start it. I can see two potential solutions:
Deployed application can be started from the command line or WinApi. The problem is that DeployOnBuild flag seems to be ignored, so the application is built, but not deployed. Is there any way to deploy a metro application, other than using Visual Studio GUI?
Maybe there is a way to run an undeployed application? Using a Visual Studio tool for example.
Thank you.
When creating the Windows 8 application packages, the build process also creates the powershell script file Add-AppDevPackage.ps1. As this is something that can be used for side-loading applications, I'd assume that you could also call this as a part of your process. You should run it manually once first to obtain developer certificate (which will expire after 3 months) and install the app signing certificate, if required. Looking at the script, using a -Force parameter should suppress the certificate installation confirmation dialog.
Under the covers the script relies on Add-AppxPackage cmdlet.
For starting the application, check out this SuperUser question.

MCR_CACHE_ROOT path empty after running the console application

I set the MCR_CACHE_ROOT to a folder C:\MATLAB_cache to speed up my compiled application. Using the linke below
How to setup MCR_CACHE_ROOT in Windows
But after I ran the console application calling it from PHP the folder is still empty.Why is it? Should I add anything in my console application or php code after setting up the MCR_CACHE_ROOT? I am working on Windows 7-64bit. The console application is C++ Win32 console application.
I deployed a c++ shared library using deploytool in MATLAB and the ctf archive is embedded in the application is it because of this?

Resources