MSMQ Trigger opens executable as background process - windows

I'm using a Microsoft Message Queuing (MSMQ) Trigger to launch a standalone executable on Windows 8.1. The exe was not launching so I tried opening Notepad instead (thanks John). That did not work either so I peaked at the Task Manager and noticed that it was opening as a Background Process.
My question is: why does the application open as a background process and how do I prevent this?
Is it possible to add a launch Parameter, for example?
Edit
I should note that I'm okay with the exe running in the background once my application goes live. I would like to prevent it from doing so during development, however.

Related

Start the websocket server automatically on Windows without a visible command prompt window

I want to start a websocket server, like using the "php artisan websocket:serve", but that automatically start with windows, and without a windows of command prompt. I know how to do it on linux with supervisor, but i need to do that on Windows 7 with Xampp.
I currently use a batch file that starts automatically with Windows, although it works correctly, I wish the command prompt window would not remain permanently visible, since the PC is used for other business stuff, and sometimes the user closes by error the window, stopping the socket server.
Of course, thank you very much for your answers and excuse my bad English.
There are several ways to start windows process without visible console window. First you could create windows service, some software support it natively or you could use utility like NSSM. Second: You could start program via task scheduler and tune task properties. Third: You could use utility like CHP to start program without console window. Remember one thing: If you start program without console window (and it is not a windows service), the only way to stop it is taskkill command or GUI Taskmanager.
To initialize the websocket server on a windows machine, without the command prompt just set autoexec.bat to halt_threads 2.

Why don't some programs appear on the task manager startup tab?

Many applications start at startup, however, some of them do not appear on the task manager startup tab. What is that due to?
Is there any way to do this with a program, for example, spotify?
What do I need to do in order for a program to start at startup, but not showing in the startup applications tab?
Setting it in HKCU/Microsoft/Windows/CurrentVersion/Run doesn't seem to work, as it starts, but still shows on the mentioned tab.
Thank you in advance.
Its mostly a factor of how the program itself is written. If its written to run as a service, or as a System Tray application, or otherwise.
I know there are wrappers for running any exe as a service NSSM being the main one I have experience with (but this is mostly for when there is going to be NO user interaction)
I do not know if there is anything that can allow an application to run in the system tray only, not in the taskbar, if it doesn't support it.
But since Spotify does support running minimized to the tray, it does seem like there are some ways to "start spotify minimized", Spotify or other applications might have command line options or other settings to tell them to start "hidden"

windows ce application opening and closing

I have a program in Windows CE 5.0 created in Visual Studio 2008. Opening the application I created works fine but when I close the application with:
Application.Exit()
I cannot open another application, I cannot even open the same application again.
Any idea what about closing the program properly? I have also tried using
Me.Close()
or
Environment.Exit()
cannot open another application, I cannot even open the same application again.
Looks like your application does not exit and 'blocks' the GUI. Or what exactly does the above mean? Can click the start button and a menu opens?
If your app uses background thread, the app will not close correctly until these threads are terminated too. You will have the app still in the process list but no GUI, the app seem to have terminated but it did not.
If you have background threads you have to terminate them BEFORE you Exit the application.
Background threads can be terminated using Thread.Abort() or using a condition in a while loop. For the thread.avort you have to code the lines of the background thread within a try/Catch block and catch for the ThreadAbortException.

Programatic launching of application on windows startup

I have a particular piece of software that i wish to load on windows startup. Under normal circumstances i would simply place a shortcut in the startup folder or an entry in the run key in the registry.
Unfortunately and for an unknown reason this application throws a win32 execption whenever that is done - and i am assuming it is because an element of windows has not been loaded that is vital to this application.
Once windows has actually loaded i can double click on the icon and it runs fine. So my question is - is there a programmatic solution to this? I have already tried a console app launcher that sleeps for n seconds and then launches but all that seems to do is delay the startup of windows.
Does anyone have any creative solutions? I am open to anything from a windows service to c#, vb, batch files.. etc
Thx
Can you run it as a service, or write a shell service which will attempt to start it up? That way you will have built in support for response on failure and delay time before trying again.
Have a look at AUTOEXEC.BAT. But be careful!!

Console windows that cannot be killed by closing or via Task Manager

When I run a test harness through the Visual Studio 2005 debugger, it creates a console window every time I run it.
In the past, the console window would close automatically when the test harness process terminated, but now I'm finding that the console window is hanging around afterwards.
After the test harness terminates:
I cannot close the console window by clicking the close (x) button on the top-right
The test harness process doesn't exist anymore in Task Manager
So I cannot seem to kill these console windows.
Does anyone know:
How these console windows can exist without a managing process?
How can I can kill these console windows?
Rebooting is obviously an option, but there must be another way.
It's a known bug in windows, introduced with KB978037 security patch.
You can find out more here
http://blogs.msdn.com/debugger/archive/2010/03/11/help-my-console-windows-won-t-go-away.aspx
and here
http://social.msdn.microsoft.com/Forums/en/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca
In Windows, "Administrator" is not the highest level user. Some processes/files/directories are only accessible by the "SYSTEM" user.
See: http://hackspc.com/how-to-become-the-system-user-in-windows-xp/
This may be the reason why it is unkillable.

Resources