Start .Net Application After Logging in - c#

I need to create an .Net application which is automatically start after windows logging in. on that time i dont want to show our desktop and windows related things.
Is it possible?I need to create one more layer between login and our Windows.That layer is our .Net Application

I don't quite get it. It is either a Windows Service, which is an application that runs in the background all the time, or some kind of a Kiosk application, which sits "on top" of everything and is effectively the only UI to the PC.

You can start make a Schedule Task and run it
http://windows.microsoft.com/en-au/windows/schedule-task#1TC=windows-7
p.s you can only can run cmd files

Related

Create a process not an application in C#

I've created a simple application that I wish to be a process and not show up as an application inside taskmanager, simply because it is not an application. It was intended to be a process.
You might want to read about Windows Services.
Walkthrough: Creating a Windows Service Application in the Component Designer
Creating a C# Service Step-by-Step: Lesson I
You don't give much information about what you application does, but either Console or Forms will be displayed on the TaskManager, and even as a process it will be shown over the Processes tab so I'm not sure what are your intentions with this.

C# app that will stay in the background and receive commands via cmd arguments?

I'm trying to make an app in Visual Studio with C# that will stay in the background and then other programs could start the app with just one argument and it will popup a notification (another form) with that argument.
I need the app to be consisted of just one process, i don't need multiple processes/instances of my app. I just want it to stay in the background and when someone starts the app with an argument, for example MyApp.exe "this is a notification", it will just pop up another form that will have that cmd argument in it, and it won't start the app as another process.
I hope you get my point, if you don't I can explain it more.
What you are wanting is more of a job for a Windows Service. A Windows Service is a program, with no GUI interface, that sits in the background and does something. The service is usually started when the computer boots up and stays running till the computer shuts down.
Communication between other programs and you service can be done using Windows Communication Foundation (or WCF). WCF allows communication between two applications using one or more transports.
Without using WCF, another way (although arguably less efficient) to "communicate" is through a database. Your service can monitor a table for rows added and your main program can add these rows whenever something needs to happen. The choice comes down to really what your end goal is.
Good luck!
Consider using named pipes (System.IO.Pipes)
or WCF's System.ServiceModel.NetNamedPipeBinding.
Other options are: old .NET Remoting or TCP/IP Sockets.
The 'background app' can be an Windows Service, but it won't allow showing any GUI form to the user, as background services don't have any forms.
For an easy way to create Windows "Background" Services see OpenSource TopShelf project.

Simple Application that executes every 15 minutes. How can I stop it from disturbing any Windows?

Basically, I have an application that runs every 15 minutes. I would like this Console application to remain hidden and not for example minimise/disturb full screen applications.
What would be the best way to accomplish this, it can't be a service though. I'm writing the console application in C#.
Thanks.
To run an application every 15 minutes use a scheduled task. The very simple way to avoid any window being shown is to make this a normal GUI app rather than a console app, but arrange that you do not show any windows in your GUI app.
like david said if you make it a gui program but never load any windows it will run in the background with nothing ever popping up or showing or anything.. another option would be to have your application run continuously and have it do something every 15 minutes...
One option would be to have the scheduled task run as a different user, Network Service maybe, depends on your needs. This will force it to run under the specificed users context and will not show up on other logged in users screens.
You don't need to do anything. A console application is invisible and doesn't interact with other windows. The only way to even know it's there is through Task Manager or something similar.

Creating VS 2010 executable for Daily Tasks

I want to create an executable in VS 2010. This executable will be create an excel spreadsheet and will transfer that file via FTP. I want this executable to be fired off via Windows tasks.
What is the best way to accomplish this? Would I create a regular windows form application, dll, or Empty Project, or windows service?
Thank you in advance for any assistance.
A plain old console application scheduled with the task scheduler should do the trick.
If you need the application to run when a computer is turned on but no one is logged in, create a service. If your application runs only when someone is logged in, but has no UI, use a console application. If your application runs only when someone is logged in and has a UI, use a Winforms app.
I'm not sure what the current best practice is, but in our shop we create console applications and use the task scheduler to execute them.
A library (dll) won't be executable from the task scheduler AFAIK, and a WinForms app isn't very useful for any app that runs automatically (i.e.: doesn't require user interaction).
A service would be appropriate for an application that needs to respond to system events/changes when they occur, which doesn't sound like your use case.

C# program without UI

Is it possible to make a Visual C# program that runs without a console or windows form? If so, how?
Sure- set the build output type to Windows Application under Project Properties, and don't show a form in Main. You can do whatever you want in there- you just have to manage the lifetime of the app somehow (eg, how do you plan to shut it down?)
You can also create a Windows Service app; start and stop the app via the Services Management console.

Categories