Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: I want to run C# program when login screen appears

30 Jan 2015   #1
aqeelahmad87

windows 7 home premium 32bit
 
 
I want to run C# program when login screen appears

I want to run C# program when login screen appears.
I will explain it

e-g there is no one sitting on my computer and my computer suddenly restarts and I want to run mine program which is very important all I want is that that program will run in background weather someone login the computer or not.

That program should be independent of user login.

Can anyone help me please


My System SpecsSystem Spec
.
30 Jan 2015   #2
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

I think that we can help using this great tutorial
Task - Create to Run a Program at Startup and Log On
My System SpecsSystem Spec
30 Jan 2015   #3
Alejandro85

Windows 7 Ultimate x64
 
 

Services are designed to do exactly that job. If you can turn your program to run as a service then that will fulfill your whole requirements.

In short, services are just normal programs with a special interface to the OS. They can be started at system start before the user logins and keep running indefinitely irrespective of any login/logoff. Services are completely background processes, without any kind of user interface at all.

If you have the chance of modifying the program, then making it into a service should be relatively easy. For C#, look at the ServiceBase class, make a subclass of it then call your original code from it.

If you can't change the program at all you may use a wrapper program and have it run yours. A good option is NSSM.

In any case, once your program is installed as a service you can manage it like any standard Windows service using control panel.
My System SpecsSystem Spec
.

Reply

 I want to run C# program when login screen appears




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Black screen with movable mouse cursor before login screen appears
Hi, I have an office desktop pc (HP COMPAQ ELITE 8100) running 64-bit Windows 7. I was manually running Windows update and manually updating some of my drivers when the pc suddenly turned itself off. I turned it back on and now it doesn't get to the login screen anymore. It just displays a...
BSOD Help and Support
An 'Open with' window appears after login
I had to replace a failed primary drive and so did a clean install of Window 7 Home Premium. Now, whenever I login in, an "Open with" window immediately appear on the desktop, naming 'Tom' as the file to be opened. Tom is the sole (admin) user. When Notepad is selected to open the file, the...
General Discussion
some times BSOD when login screen appears
My os is windows 7 ultimate 32 bit hardware age :-2.5 years i've re-installed OS 4 times because of BSOD, i ve performed memory test:- 4 pass 0 error some times BSOD when login screen appears ,some times after logon :cry::cry:
BSOD Help and Support
Download program on 1 account, appears on 2
I have 3 Windows user accounts. I would like to be able to keep the files and programs on each account separate from one another. If I download, say, World of Warcraft on my gaming account (which I can set time limits for), then it appears on my work account as well (which I can't set time...
Software
Login Screen Appears with no password and one account
I have two machines that I've installed Windows 7 Professional 32-bit on and I'm having the same problem on both. When I turn on my computer it goes to the login welcome screen and stops. I have to click on my picture for it to continue logging into the desktop. I have no password and only one...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 06:16.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App