Are you able to run windows command from Blazor app? - cmd

Is it possible to run windows CMD commands from a Blazor app and output the command responses to the app?

No, your in an "isolated" Browser window with no access to the host operating system. Consider the security implications of being able to do so.

Related

Is it possible to run UI Automation as a Windows service?

I have a Windows VM with a desktop application on it. I want to write an agent which will interact with this application through UI automation (via WinAppDriver). The agent should start with the machine and require as little human intervention as possible to do its job.
It's easy enough to get this working by adding it to startup programs (shell:startup), but this requires someone logging into the VM every time it is restarted. Is it possible to run such a program as a Windows Service? Keep in mind it would have to launch a Win32 app and interact with it via UI automation. Could this be done by running it as Local System account and enabling "Allow service to interact with desktop"? Or would it need to run as a specific user account?
No, it is because Windows Service runs in background and to access the UI the process should run foreground.

Is it possible to containerize a Windows GUI application on a Windows host?

I have a rather difficult to manage Windows closed-source Windows GUI application. It's messy (leaves files all over the place) and has a convoluted installation process.
It has been proposed that we containerize the application, but can this be done?
For UNIX applications there's an easy pattern - just give the app access to the port of the X11 server, and allow the app to write to that, but is there a Windows equivalent? Is there any way at all to containerize a Windows application but allow it to generate windows in the host Operating System's desktop?
If this is possible, are there any handy recipes to get started with this?
Currently, It's not possible to containerized Windows GUI application on a windows host.
From the blog Insider preview: Windows container image
Lars Iwer [MSFT] writes in the comments below the article:
"In the container image as it is right now, GUI elements will be rendered in session 0. UI automation should work with that (e.g. programmatically searching for a window etc.)."
So according to my understanding, you can run GUI apps but the rendered elements are not shown on any desktop which will only work for UI automation work but not for user interactive application.
Session 0:
Session 0 is reserved exclusively for services and other non-interactive user applications. Users
who are logged on to Windows and their user applications must run in Session 1 or higher.
- User interfaces in Session 0 are not supported. Processes running in Session 0 have no access to the graphics hardware thus user interfaces cannot be directly displayed on the monitor.

Use winexe to open windowed application remotely

I have to open an application like broffice on WINDOWS that is on AWS EC2 and write a text on it. This application is obviously windowed and I have to execute it from a Linux Server.
I'm trying to use winexe, but I think that it does not open windowed apps.
Is it possible to show windowed applications and performs clicks and writes tests on it remotely?
Please, do not worry about what I want to do after show window. I need run windowed applications remotely and show the window.
You could use winexe to call another tool that can handle the UI automation for you. It looks like Autoit may be able to do what you need via creating a script and compiling aut2exe. https://www.autoitscript.com/site/autoit/
I fix our problem creating a secure REST WS that receive a key and execute the command internally. It works in a queue of remote commands and return us the answer code. With this code we validate if our command was correctly executed or not. Other solutions found: use servlet, soap or queues, or virtualmanager. All those solutions was discarded because, or was very complicated for our problem or we don't have permission to execute, or will generate security problems.

Access windows application installed in EC2 using browser

I have installed QAD Netui Client (application with .exe executable) on Windows EC2 instance.
I would like to access that application through web browser or by any other way without the need of logging-in into windows instance.
The reason behind this requirement is that, I don't want users to get information about machine on which my application is installed.
Is there any way to achieve this requirement ?
Not likely. This appears to be a Window GUI application rather than something like a web application.
As a GUI application it needs a Windows desktop session to run. This is accomplished with remote desktop or other similar application that allows you to share a desktop with another client.
However, you can set up a Windows user profile that has much more restricted access to the machine. This is probably the closest you will get.

Is it possible to run programs locally from a terminal services remote app?

First, I guess I'd have to figure out if I'm running remotely and second I'd have to figure out whether my remote connection is a standalone remote app or an app running on a terminal server (that may be tricky).
But, once I've figured out all those awful things, is there a way to run a windows function like ShellExecute locally instead of remotely?
The reason I'd want to do this is because I launch a web browser to view rather high bandwidth things that require javascript and flash and certain sysadmins who administer our product aren't too keen on having to make unnecessary and insecure modifications to their terminal server farm.
Yes, if the clients are running Windows and you can install software on them.
See Remote Desktop Services Virtual Channels in MSDN.
There is a free tool that does exactly what you want. I got reference from TechNet forums, it's named Remote Executer from http://www.mqtechnologies.com
Good luck

Resources