Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Members,

I want to create a service.

In this service I want to handle first time system start up event and also to send a SMS on the start up of machine.

Thanks.
Posted
Updated 13-Mar-11 23:56pm
v2
Comments
Dalek Dave 14-Mar-11 5:56am    
Edited for Readability.

If you're using VB.NET this site seems to be quite interesting (with code samples):
http://oreilly.com/pub/a/oreilly/windows/ron/startup_0401.html[^]

Cheers!
 
Share this answer
 
v2
Comments
Dalek Dave 14-Mar-11 5:56am    
Good Link
Espen Harlinn 17-Mar-11 9:54am    
Agree, 5ed!
Are you sure you want the sms sent when the system starts, or would you rather send it when a user logs in, or both? I would use a Windows service for that. A windows service can send an sms when the system is started, and can also send one when a user logs in (and/or logs out).
 
Share this answer
 
Comments
RaviRanjanKr 14-Mar-11 6:06am    
Nice Answer! My vote of 5 :)
Manfred Rudolf Bihy 14-Mar-11 6:54am    
I googled a bit, but came up without anything conclusive. How would you go about checking that the service was started through system startup and not started at a later time?
The service could be started, stopped and then restarted.
#realJSOP 15-Mar-11 5:34am    
I'm not sure you'd even have to worry about it, since the service would start automatically, and could be set to sit/spin with no processing.
Manfred Rudolf Bihy 15-Mar-11 5:57am    
My doubts revolve about how you want to differentiate that a service was started because of a system start and not just because the service was stopped and then restarted. If I want to send a message only on system start how do I keep these two things apart in the service.
Ashok Hurkat 15-Mar-11 5:14am    
I want to send SMS at very first system (Computer) start up in a day.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900