![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2004
Posts: 8
Rep Power: 0
![]() |
what is the code to make a vb app wirte itself to the registry?
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
Im not sure i know exactly what you are asking, then again im on drugs... you want a program to write itself into registry? Why? Better yet, just tell me what you hope to accomplish...
__________________
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Dec 2004
Posts: 8
Rep Power: 0
![]() |
i want to know how to make a programm add itself to registry to run at startup
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Dec 2004
Posts: 2
Rep Power: 0
![]() |
No problem. The easiest way is just downloading a Class Module which will control the registry. Then you just have to add a value to the startup key in the registry, holding the place of your app. Download the Class Module from here:
http://www.vbaccelerator.com/home/VB/Code/...rol/article.asp And check out the syntax for anything. For instance, in your cause, I'd do this: Dim c as New cRegistry With C .ClassKey = HKEY_LOCAL_MACHINE .Sectionley = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" .ValueKey = "The name of your app to be" .ValueType = REG_SZ .Value = "(c:\windows....\yourapp.exe" End With |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Dec 2004
Posts: 8
Rep Power: 0
![]() |
so when i have the class do i add it to my project then put that code in my forms general declarations or what?
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|