|
-
Dec 28th, 1999, 04:55 AM
#1
Thread Starter
New Member
I need to add a string to the rigistry that will start an app. The app is in c:\test\start.exe. How can i add this to the registry using VB6? or not even using vb6.
Or any otherway to get the app to startup with windows other than c:\windows\startm~1\programs\startup
Thanx.
-
Dec 28th, 1999, 10:38 PM
#2
You could use the WriteProFileString to add the line to the run part of the win.ini.
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
and in the project
Call WritePrivateProfileString("windows", "RUN", "C:\test\start.exe", "C:\Windows\Win.ini")
-
Dec 29th, 1999, 01:28 AM
#3
Guru
For the registry: Use the Registry API functions, Aaron has an example at http://www.vb-world.net/ubb/Forum1/HTML/009026.html
The place in the registry you would want to add it to is HKLM\Software\Microsoft\Windows\CurrentVersion\Run
[This message has been edited by Clunietp (edited 12-29-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|