Issues in launching desktop extension code from UWP app - wcf

I have a requirement to host a WCF service to receive responses from a service. As UWP app doesn’t have wcf hosting capabilities, I chose this system tray component where I will host my service so that I get responses and communicate to UWP app via app service and show toasts.
But the systray component terminates immediately after the launch. To be clear on my systray integration with uwp I already tested it and is working and then extended it with WCF hosting.
Later I tried adding debugs showing message box on exceptions and found out that WCF service open call throwing below exception.
"System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http::1234"
Later understood that the sys tray app requires admin rights to register the URL that is hosted as part of the service and as UWP app launches sys tray via full trust API and it doesn't do through admin elevation.
So to solve this I got 2 approaches and tried as mentioned below:
1)
So I tried adding URL reg manually using netsh and same program works. Just to tweak I tried running the "same netsh command in sys tray app itself with admin priv" and only launched the tray app and i could see no exception and could see my service hosted, checked in browser.
Now I'm stuck with providing admin privileges while launching the sys tray app via UWP app.
But if tray app is launched by UWP, even though I included the netsh command it still shows the same exception. (Might be parent process (as run as admin is N/A UWP apps) is not having admin rights so even my netsh cmd in sys tray app is not working??? )
OR is there any way to provide arguments or any other API to run the tray app with admin via full trust api's from UWP app???
2)
Tried adding app manifest file to the tray app and modified as below
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
But this also shows a error box saying this requires elevation and exited.
Kindly Help.

Requesting elevated privileges is currently not supported for desktop-bridge processes. So what you are seeing here is currently expected. The good news is that we are adding a new capability in RS5 (Fall 2018 update) called 'allowElevation', which will enable scenarios that require elevation.
You should be able to start testing the new capability with the latest Windows Insider Preview build and the corresponding SDK.
UPDATE 10/1/2018: I have posted a sample for this new capability
https://stefanwick.com/2018/10/01/app-elevation-samples-part-1/

Related

Multiapp Kiosk Mode in Windows

We use Openkiosk ( Firefox browser Based ) - credits MDG for kiosk operation of our web application running through IIS ( MVC web app) and SQL Serever . We have configured it to automatically start on windows log in by using the GPO - custom User Interface and it works perfectly fine.
The purpose of launching the web application in full screen is to prevent Desktop access to the user and also disable all short cut keys .
Of late we have received a new requirement where we have to Launch another desktop app ( exe. ) on demand when the Openkiosk is open and switch in between both the Openkiosk app as well as the exe app whenever the user requires . Since the desktop is not visible how we launch the Desktop is the question and also ,Since the Key board is disabled Alt Tabs wont work. Kindly advise and guide how we can achieve this ?
Still figuring it out how to achieve this

How do I prevent .net core service closing when I close electron window

I am building an Electron app in .net and using the Electron.net package and following their example web app.
But I would like to keep my .net web service running, even if the user closes the Electron window.
I'm planning to put a tray icon to allow the user to re-open the user interface if they've closed it.
But it looks like the BrowserWindow has somehow been set to terminate the application if the last window has been closed.
How can I keep it running?

RDS: RemoteApp notifications icon is not visible

I'm using Windows Server 2016 for Remote Desktop Services (RDS) the applications I've published are working fine. I've created a logon script so that my windows application starts when a user establishes RDS session. My problem is when a user logs in and my application runs automatically it doesn't show icon notification in system tray. I've gone through the below link and added the registry key which fixed the issue but it had also shown all unwanted application's icon as well.
https://social.technet.microsoft.com/Forums/lync/en-US/4122521f-7896-4098-a723-858077a243f1/remoteapp-notification-area-icons-not-visable?forum=winserverTS
Is there any way that I could programmatically dictate "rdpshell" to show only my application icon? or if there is any registry key specifically I could use for my application? or anything that I could use to show my application icon only?
Thanks.

COM component not activated due to privilege issue

We have developed an office add-in. Its working fine with every other system except one. In that particular system when we try to load the app, it fails with a generic error (This app could not be started. Close this dialog to ignore the problem or click "Restart" to try again.). Event viewer has the following details
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
and APPID
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
to the user STC\inmchandr SID (S-1-5-21-2779513660-4158667818-3257731910-104078) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
The specified CLSID points to ShellWindows component, which is running with "Interactive User" account. I am unable to change the other security permissions like launching permissions for that component in DCom config. I tried to change the permission for the corresponding registry entry (as suggested in this link) But, nothing worked out.
The winword.exe is running as the same user who logged in. This system and the other systems (where it is working) are in the same network and I tried running gpupdate as well.
(In that problematic system) The same app is loading when we tried to run Word as administrator. The URL used for that taskpane app is launching without any issues from browsers
OS: Windows 8.1
Processor: 64 bit
Office: 2013
Could anyone help us out to resolve the issue?

Using FirewallException api in Wix to apply setting to all network profiles in Win7

An installer with wix I've made uses the FirewallException api to register some components of the package with the Windows firewall, in order to try and prevent firewall popups.
It seems that in Windows7, it only registers with exception for the network profile (ie Work/Home/Private) that is currently active when the user runs the installer. When the user changes network profile, and runs our application, they are presented with firewall popups.
Can we use the firewall exception to apply the settings to all Network Profiles? The syntax I'm currently using is:
<fire:FirewallException Id="XXXX" Name="Program Name" Scope="any" File="WixFileRef"/>
Your code didn't come through but you can control the profile(s) used using the Profile attribute. It's available in WiX v3.5 and later.