Open app as gui via powershell for a specific user - automation

I have an app that needs to run as a GUI, I'm trying to automate it's launch at startup without the need to remote desktop to the windows server 2008 R2 and manually start it. I currently use a powershell script at startup to perform multiple tasks but have not found a way to launch this gui app in the foreground for the user. So for now I still need to remote in and manually kill / start it.

psexec.exe will help you here.
this guy can execute interactively in a remote execution. PowerShell in remoting cannot be used for interactive tasks.

Related

How to use VB.NET windows service to check if application is running and Close or Kill the application

I have a VB.NET windows service that I created to start another VB.NET application on a virtual machine reboot.
How can I use the VB.NET windows service to check if the application is running and stop or restart the application?
See CheckApp - by me I've coded this Windows service application to check every 5000ms (5 seconds) if a specified process running. You can modify the code with your own relevant processes (e.g. starting that process again if stopped.)
You can install the service using InstallUtil from Tools > Command Line > Developer Command Prompt in order to deploy the service.
Make sure you have logged on as Administrator on Visual Studio.
As soon as the service starts, the timer Refresher starts which does your required work.
Go to Services and find App Checker after installing it, then finally enable it.
Hope it will help you.

How do I Execute Visual Basic Exe and Crystal report in LAN

Hi I have a Visual Basic Project Exe which runs fine on a Single Machine i Want it to be Execute for Multi User in LAN. I Have Used Crystal Reports in My Project and database is MS Acess. Please Help me how run the Project in LAN..
A VB EXE is a client architecture which usually needs installing on each client machine using it. The code in the EXE could/would normally then connect to external shared, singular resources over a network (such as databases, reporting servers etc.) but the actual EXE itself would typically be duplicated upon each client computer.
If you need all the users to open the exe and have it always run on the same machine, then you could create client shortcuts or use a script with a CreateObject("application.NameHere","serverToRunAppOn") call &/or modify the DCOM settings for the app through the dcomcnfg tool...
However I'd sugguest instead re-evaluating your architecture. Possibly turning your app into a better practice web-based or MS Access shared MDE+MDB solution for clients to connect to.

Jenkins on unix executing script on windows server

I have a CI environment set up that build my project. It creates a set of sql server files, that i want to to send to my windows server. For that im looking into using scp, by installing copssh.
scp -r /file_in_unix/ user#windows_hostname:/cygdrive/c/
I want to execute a batch file on the windows server, but dont know how to do this?
any ideas?
Quite fast workaround is just to connect your Windows machine to Jenkins as another node. Your current unix job can trigger this job after successful execution.

Remote logon through Powershell and task execution

Is it possible to logon to the remote machine using Powershell, and to execute scheduled task or batch file, which contains CodedUI tests? I have tried Invoke-Command, but CodedUI test cannot be executed because it has no control over the desktop. Autologon is enabled on the machine, and all I need is to remotely login to it, and execute scheduled task. Is that possible?
Thanks, Ed.
If you need an interactive desktop session, you will need to use RDP or similar. When you create a remote PowerShell session, or use Invoke-Command, you're creating a new session, not connecting to an existing one. And there's no GUI to associate with it.

Run an executable when a web address is called

I'm trying to find a way to run a dos executable when called by another server.
It's hard to explain sorry,
So I have a windows server 2008r2. On it is a dos exe that I need to run.
I also have a linux ubuntu server that hosts some SQL and web pages (apache).
Users update a table in the linux box, and when they do I need to run a dos exe on the windows box.
I don't want to use scheduled tasks on the windows box, because updates need to happen at the moment the data is changed in the linux box with little delay.
Any way anyone can think of that the linux box can 'call' the windows server to run the exe?
Thanks :)