TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ryan
NA
5
0
Finding the path of the current program
Jul 20 2005 11:40 PM
Is there an easy way to do that? I'm relatively new to C# and I'm writing a program that gives the user the option (via a checkbox) to start when windows boots up. To do that, I was going to add a registry key using the following:
RegistryKey key = Registry.CurrentUser.OpenSubKey( @"Software/Microsoft/Windows/CurrentVersion/Run", true);
key.setValue("program name", "PATH GOES HERE");
But I don't know how to find out the path where the program is. Is there a way to find it without resorting to a search for the program name (which the user could have just changed anyway) like in this example http://www.codeproject.com/csharp/WinWhich.asp ?
Thanks in advance
Reply
Answers (
6
)
MySql syntax error in C# code
Xpath and namaspacemanager problems..