UWP to launch my application from WPF application - c#

I have a Windows store app I want to run (if not running) or expand (if not expanded) of another of my app written in WPF.
Through The Process.Start() I could not do. Tell me, can this be done? Thanks for the help!

To launch an UWP app from another app, you could make use of deep linking.
Here is a great article describing exactly how to do that
In summary, you need to add a protocol declaration (essentially a URL with a custom scheme), handle the activation event and then you can launch that app by navigating to that URL from your other application.

Related

Running my UI app (WPF App) inside Worker Service with C# .Net Core

I'm new in programming with .Net and C# and, as said in the title, I have a WPF app which is accessible in a system tray icon and I want to run it a windows service.
Typically, I want an output like it was described in an answer provided in a discussion here.
If you want it in the system tray I think what you'll have to do is make it a Windows service. I've only written 1 Windows Service and that was years ago, but I believe that's what you'll have to do. If I'm correct about writing a Windows service, then what I would suggest you do is create a new Visual Studio solution and add two projects to it. One would be a DLL which would run as a Windows service. The second project would be a WPF project that will be your UI the user interacts with. Then you'll have to use some messaging system to communicate between the two. For the action messages that would mimic what Outlook does, I've used some WPF toast messages to accomplish that. If you Bing/Google "WPF toast popup" you'll get lots of results.
I have many searched in Internet and find some helpful answers like:
URL1
You can't, not directly, because the windows service will necessarily start when the machine does, not when a user logs in. The service will also be running in a different context, likely as a different user. What you can do is to write a separate system tray based "controller" that interacts with the service.
URL2
It needs some effort to achieve. Well, just two hints: 1) use static property System.Environment.UserInteractive to detect in which mode your application is running, see http://msdn.microsoft.com/en-us/library/system.environment.userinteractive.aspx; 2) get rid of app.xaml, because it will force starting WPF Application in all cases; instead, create and run and instance of System.Windows.Application (or better, a specially derived class) explicitly and only for interactive mode, see http://msdn.microsoft.com/en-us/library/system.windows.application.aspx.
And, I could not apply their instructions.
Thanks advance!

How do I run a process in a UWP before displaying app

I've completed a winform project that handles a uri scheme (TEL:)
I'm now trying to do the same in UWP. I've successfully got the app launching on TEL activation.
How do I stop the app showing when its run with arguments? Run silent.
The app runs a task and closes. There is no need for the UI unless the user hasn't done the first time set up or there is an error.
I've been looking into prelaunch but before painting myself into a corner I wanted to ask a more experienced user what the best practice is as I would like to publish this application and follow best practice.
I've checked similar questions but they were after a background service.
Thank you.
Answer thanks to Nico Zhu.
Can not launch an app without displaying UI but it is possible to use 'FullTrustProcessLauncher' to run an exe instead.
More information on this can be found here

WPF app not interacting with my Windows service

I have a windows service which needs to open a WPF application based on an event.
I am done with coding and when I run a WPF application instance through a process from my custom window service then it opens the app but hidden to me.
I confirmed it's existence from task manager where my app instance has been created but APP GUI not visible to me.
I also tried using "ProcessExtensions" class available on Github but that didn't help.
Please suggest what should I do for this!
Some saying for IPC mechanism but that I don't wanna use. Please let me know how can I achieve it!

How to create a registry that allows the Silverlight applications access to camera and mic

I need to know how can I create a registry that allow the Silverlight applications access to camera and mic.
Scenario:
I have a Silverlight application that start the WebCam, before it works it shows a Silverlight dialog asking if the user allows the application to access it.
Finally I'm creating a desktop app that loads the Silverlight application in a web browser. I want my application desktop to creates a registry or something like that to allow this access and stopping to show the Silverlight dialog.
Exists some solution to this?? If yes, how can I do this?
For someone who has the same issue here is the solution:
https://stackoverflow.com/a/17829842/2882534
Just create a subkey named whit your Url plus port(ex: http://localhost:54895) at the HKEY_CURRENT_USER\Software\AppDataLow\Software\Microsoft\Silverlight\Permissions
After that, create a registry named WebcamAndMicrophone with DWORD and value 11.
Shazan! The silverlight dialog is not more necessary.
Tutorial to manipulate registrys:
http://www.codeproject.com/Articles/4808/All-you-wanted-to-know-about-the-Registry-with-C-P

Create a process not an application in C#

I've created a simple application that I wish to be a process and not show up as an application inside taskmanager, simply because it is not an application. It was intended to be a process.
You might want to read about Windows Services.
Walkthrough: Creating a Windows Service Application in the Component Designer
Creating a C# Service Step-by-Step: Lesson I
You don't give much information about what you application does, but either Console or Forms will be displayed on the TaskManager, and even as a process it will be shown over the Processes tab so I'm not sure what are your intentions with this.

Categories