|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Registered User
Iscritto dal: Jan 2004
Città: legoland
Messaggi: 121
|
VB e esecuzione automatica
Come si fà a far partire un programma scritto in vb con l'avvio del computer senza metterlo nella cartella "menu avvio\programmi\esecuzione automatica"?
grazie |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Oct 2001
Messaggi: 11471
|
Dovresti guardare nel registro. Ora non ricordo esattamente dove ma da qualche parte cera da inserire una chiave con il nome del eseguibile e il processo da eseguire ad ogni avvio.
Un'altra soluzione potrebbe essere win.ini ciao ![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
|
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Aug 2002
Città: Biella
Messaggi: 1882
|
Il percorso è questo:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Ti passo una classe ed il modo per mettere appunto un eseguibile dentro il registro: Codice:
'scrivo nel registro lo start up Call mcRegistry.RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run") If chkAvviaStartUP = 1 Then Call mcRegistry.RegSetStringValue(sAppName, App.Path & "\" & App.EXEName & ".exe") Else Call mcRegistry.RegDeleteValue(sAppName) End If Call mcRegistry.RegCloseKey Codice:
Option Explicit Dim mcRegistry As clsRegistry Private Sub Command1_Click() 'codice per inserire il tuo valore nel registro End Sub Private Sub Form_Load() Set mcRegistry = New clsRegistry End Sub Private Sub Form_Unload(Cancel As Integer) Set mcRegistry = Nothing End Sub
__________________
"Analizzando e valutando ogni giorno tutte le idee, ho capito che spesso tutti sono convinti che una cosa sia impossibile, finchè arriva uno sprovveduto che non lo sa e la realizza!" A. Einstein |
![]() |
![]() |
![]() |
#5 |
Registered User
Iscritto dal: Jan 2004
Città: legoland
Messaggi: 121
|
Sono + che soddisfatto.
thanks all |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:51.