I have some console C# application, which is working on Windows CE environment. This application start the other main application.This part is working. But also it have to detect when/if main application crash and in this case restart main application. Is there any way to detect application crash by program?
Thanks, Slava.
I have found the solution, which is pretty match to my needs.I just put the application to \Windows\StartUp folder and that is it. After restart all applications in StartUp folder are coming up,including MyApp.
Related
I'm trying to solve a problem related to run an UWP app on top at startup (with Winodws 10).
I already put the app in the autorun applications but it always runs in background (the application is opened and if I click on the icon in the application bar I can see it). Unfortunately, I would like that it runs automatically on top.
How can I solve it?
#Xavier Xie We are also facing the same problem, what we are trying to build is a Windows 10 IoT machine that displays latest contents in fullscreen from a server automatically whenever the machine is started up / restart. Tried with StartupTask but it only brings up the App minimized / suspended at Windows startup.
The only way workaround for now is to drag a shortcut link of the installed UWP App into the startup folder. (type "shell:startup" in Explorer) Not as elegant and automatic but it works.
I make and run Windows form application in VS. Then I close the VS (not running win form application). But still my Windows form application was running.
Does this mean that Windows form Application runs under operating system ?
basically when you create a win form application in visual studio, the first time you run it, it creates an executable (.exe) file in its bin folder. so even though when you close visual studio it will keep running.
(but when you run it in debug mode, the moment you close the VS, your
win form application will also be closed)
but one thing any program or process that runs in your machine is managed by operating system, like allocating memory resources etc...
Hope this will help
I have to put this as an answer since I need to place some image -
Closing VS will close the application only when its being debugged and you have started the app using VS
Being debugged - (you see a Running on top left)
This is true for both - Current project or an external system
However, if you are debugging an application by Debug -> Attach to process.
Closing VS will not kill the applicaiton although you can debug it.
We have one Desktop application build with .NET3.5 in VS 2008. It is deployed on Network location which is accessible across the firm. Shortcut is created on user's machine to start the application. Desktop is being build (compiled) in AnyCPU configuration as Some user using XP machine and some are using Windows 7. Whenever new build (dlls and exe) deployed on network location, user have to close the app and restart it to work properly
Problem
We are facing a issue whenever we deploy new build (dlls and EXE) of the application. On Windows 7 machine application is not starting if we close the current running instance. User has to restart the machine itself to get it work.
Any help or suggestion is appreciated.
There is limited info to go on but the first thing I would make sure of, is the application still running under the Processes tab in the task Manager?
Go to the task manager on the computer and check the running processes tab to see if this app is still running.
It could be that it doesn't shut itself down properly after the user quits the application.
If the program is still running in the background then Windows will require a restart before the new dll's are loaded.
I have created a win form application in c# with sqlce. I followed the steps here http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html making some tweaks along the way since I was using sqlce 3.5 .net and that blog was talking about 4.0 .net.
When I finished the application, I created a set up project and build it which gave me an msi and setup file.
Now when I run this set up on my own machine where I developed the applicaton, it works a charm.
I tried it on a friend's machine as well, it worked well, he had visual studio 2010 as well on his machine.
Now when I tried it on 2 other machines with VS, after installation, on launching the exe, it launches and immediately closes, I do not see anything although.
I know it launches as i look at processes from my task manager it shows it in there for like 3-4 seconds and its gone.
I tried using this Not able to run the .exe file created from c# where i wrapped the try and catch around all the code inside the root win form but no text file was created with any errors.
On doing some research, it says it could be because I am missing some dll's, how do i make sure all the dlls from the references would be copied into the project ? I set all dll's to true for copy local.
Is this something else and not related to dlls?
I really just want to be able to install the application on any machine without any problems.
Thank you for your time.
EDIT
I need to add that this was a project that involved using an XBox controller sending data to a wireless receiver that was hooked to a PC. I used the XNA framework to intercept these and display some form of output on the Win Forms.
When packing and installing/deploying an application that makes use of the XNA DLLs on another non developer machine, the XNA framework needs to be installed.
My solution was packing my application along with the xna installer and so the xna framework installs as a prerequisite and then my application installs and then it no longer crashes.
Thanks to mrlucmoring and Mark for their support and troubleshooting.
I'm programming in C# under win7 and windows XP. My software needs to auto start when the system starts. So I modified the registry to conform to this requirement, but when I start the computer, the desktop will show for a while. I know this is because explorer.exe runs before the auto-start program. I want to how to let my program run before explorer so that the desktop could not be shown? Does anyone have any insight?
Did you try making it a Windows Service (Visual Studio project type)?
And the setting the service to autostart.
What you are looking for are Windows Services. Do be advised though, that explorer.exe sort of is Windows. So I doubt you will achieve whatever it is you are trying to achieve.