![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
Make Program run on StrartUp
Hello, Is it possible to make you program run when the user turns on their computer, anfd logs on,etc.?
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 126
Rep Power: 3
![]() |
There's two ways it can be done. You either need to add an entry to the registry, or add an entry in the startup folder. This link tells you a bit about the registry. To add an entry to the startup folder, just make a shortcut to your program and add it to "X:\Documents and Settings\*User*\Start Menu\Programs\Startup" - where *User* is the name of the user and X:\ is the system root - this is only true for windows xp. From memory, in earlier versions it would be "X:\windows\Start Menu\Programs\StartUp"
You'll have to look through the VB help files to learn how to edit the registry, but here is the article for VB .Net on msdn - Link Hope that helped. ![]()
__________________
it's ironic considerate rarity patron of love higher knowledge engulfs me... |
|
|
|
|
|
#3 |
|
Professional Programmer
|
Yes that worked well, now u ready for another question. My program is sumthign that requires you to make a password to use later. Now after Install and the user runs it for the first time. how can i make it show that form you make your password oin, and thne make that form never show again? And the Only time it will show up again, is if the user uninstalls and reinstalls.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 126
Rep Power: 3
![]() |
You'd have to save the info in a configuration file. Basically just any old text file that has basic info about your program. For instance you could have an entry that reads "IsFirstRun = 1;" - and when the program starts for the first time, it reads this line and shows the form. When the user has completed the form, just set the value to 0. So next time it runs, it will read the value as false and not show the form.
Again, for implementation, you'll have to check out the help files, as I'm not familiar with the exact file i/o functions in VB. ![]()
__________________
it's ironic considerate rarity patron of love higher knowledge engulfs me... |
|
|
|
|
|
#5 |
|
Professional Programmer
|
Thank you muchs
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain Destruction leads to a very rough road, but it also breeds creation. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|