Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 4th, 2007, 04:17 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default start automatically application(s)

hi,all
i have a desktop application that i wrote it with c#.net
i want to start my application automatically when windows was started

note that i dont want to create a short cut from exe file and locate it in startup folder
can any one helop me?
thank's for your help
kiani
 
Old February 4th, 2007, 05:32 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Didn't we do this before?? Please don't cross post your messages....

http://p2p.wrox.com/topic.asp?TOPIC_ID=55104

Peter said to create a Windows Service. That's about the only alternative I can think of, if adding an item to the Start Men's Startup folder isn't an option.
Did you look into Windows Services? Do they meet your requirements?

Another option is place a short cut in the Run folder of the current user's or machine's registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Run

Do a search on Google to find code for writing to these keys.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old February 4th, 2007, 03:26 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,Imar
im so sorry for posting the same message at once

thank's for your good help
can you help me for write the code for windows service or
the code that locate the short cut to the registry?

thank's agani

kiani,mehdi
 
Old February 4th, 2007, 03:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:can you help me for write the code for windows service or
the code that locate the short cut to the registry?
No, but I can put you on the right track.

There are lots and lots of articles available about writing Windows Services. Try a Google search for

build windows service .net

Similarly, search for

write registry key .NET

to find sample code.

If this is a one time operation, just start regedit, browse to the keys I mentioned and add the application.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
start a context automatically, while tomcat starts sureshrgsl Apache Tomcat 4 May 17th, 2007 06:46 AM
start a context automatically, while tomcat starts sureshrgsl BOOK: Professional Apache Tomcat 0 April 16th, 2007 02:14 AM
start automatically application(s) !!!!!!!! angelboy .NET Framework 2.0 1 February 4th, 2007 05:33 AM
start automatically application(s) !!!!!!!! angelboy C# 2005 4 January 31st, 2007 07:00 AM
Run vb application automatically PbsiGuru General .NET 3 March 17th, 2004 04:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.