Visual Basic - Reguistro

Life is soft - evento anual de software empresarial
 
Vista:

Reguistro

Publicado por CLOSs (1 intervención) el 14/04/2001 08:14:40
Hola me podrian decir como ago supongamos que al apretar un boton ponga en el reguistro que se ejecute la calculadora.exe de windows al PRENDER EL PC e encontrado mucho esto :HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run
pero no se como aplicarlo
:( gracias .
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Reguistro

Publicado por Aversinosvemos (25 intervenciones) el 14/04/2001 11:33:03
¿Has probado de una manera mucho más fácil?, es decir,simplemente haz desde ese botón un Filecopy con el programa que quieras lanzar y lo copias en la carpeta de inicio de Windows.

Esto te debe funcionar

Si tienes problemas escribe otra vez

Un saludo. AVERSINOSVEMOS
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Reguistro

Publicado por Aversinosvemos (25 intervenciones) el 14/04/2001 11:35:48
¿Has probado de una manera mucho más fácil?, es decir,simplemente haz desde ese botón un Filecopy con el programa que quieras lanzar y lo copias en la carpeta de inicio de Windows.

Esto te debe funcionar

Si tienes problemas escribe otra vez

Un saludo. AVERSINOSVEMOS
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Reguistro

Publicado por edu (423 intervenciones) el 15/04/2001 05:05:40
Const REG_SZ = 1
Const REG_BINARY = 3
Const HKEY_LOCAL_MACHINE = &H80000002

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

Private Sub Command1_Click()
SaveString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Cal", "c:\winnt\system32\calc.exe"
End Sub

Private Sub Command2_Click()
DelSetting HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Cal"
End Sub

Private Sub Form_Load()
Command1.Caption = "PONER CALCULADORA"
Command2.Caption = "QUITAR CALCULADORA"
End Sub

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Parte II

Publicado por edu (423 intervenciones) el 15/04/2001 05:06:14
Sub SaveString(hKey As Long, strPath As String, strValue As String, strData As String)
Dim Ret
RegCreateKey hKey, strPath, Ret
RegSetValueEx Ret, strValue, 0, REG_SZ, ByVal strData, Len(strData)
RegCloseKey Ret
End Sub
Sub DelSetting(hKey As Long, strPath As String, strValue As String)
Dim Ret
RegCreateKey hKey, strPath, Ret
RegDeleteValue Ret, strValue
RegCloseKey Ret
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar