IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 21 Temmuz 2008, 19:16   #1
Çevrimdışı
Yardımcı Admin
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Programın Windows açılışında otomatik başlaması




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
 '// Kaynak: vbaccelerator.com

Public Enum eAutoRunTypes 
    eNever 
    eOnce 
    eAlways 
End Enum 

Public Property Let AutoRun(ByVal eType As eAutoRunTypes) 
Dim ***e As String 

    ***e = App.Path 
    If (Right$(***e, 1) <> "\") Then ***e = ***e & "\" 
    ***e = ***e & App.EXEName 
    
    Dim cR As New cRegistry 
    cR.ClassKey = HKEY_LOCAL_MACHINE 
    If (eType = eNever) Then 
        ' 
Remove entry from always Run if it is there
        
cR.SectionKey "Software\Microsoft\Windows\CurrentVersion\Run" 
        
cR.ValueKey App.EXEName 
        On Error Resume Next 
        cR
.DeleteValue 
        Err
.Clear 
        
' Remove entry from RunOnce if it is there: 
        cR.SectionKey = "Software\Microsoft\Windows\CurrentVersion\RunOnce" 
        On Error Resume Next 
        cR.DeleteValue 
        Err.Clear 
    ElseIf eType = eOnce Then 
        ' 
Remove entry from always Run if it is there
        
cR.SectionKey "Software\Microsoft\Windows\CurrentVersion\Run" 
        
cR.ValueKey App.EXEName 
        On Error Resume Next 
        cR
.DeleteValue 
        Err
.Clear 
        
' Add an entry to RunOnce (or just ensure the exe name and path 
        ' 
is correct if it is already there): 
        
cR.SectionKey "Software\Microsoft\Windows\CurrentVersion\RunOnce" 
        
cR.ValueKey App.EXEName 
        cR
.ValueType REG_SZ 
        cR
.Value ***e 
    
Else 
        
' Remove entry from RunOnce if it is there: 
        cR.SectionKey = "Software\Microsoft\Windows\CurrentVersion\RunOnce" 
        cR.ValueKey = App.EXEName 
        On Error Resume Next 
        cR.DeleteValue 
        Err.Clear 
        ' 
Add an entry to RunOnce (or just ensure the exe name and path 
        
' is correct if it is already there): 
        cR.SectionKey = "Software\Microsoft\Windows\CurrentVersion\Run" 
        cR.ValueKey = App.EXEName 
        cR.ValueType = REG_SZ 
        cR.Value = ***e 
    End If 
        
End Property 

Public Property Get AutoRun() As eAutoRunTypes 
    Dim cR As New cRegistry 
    cR.ClassKey = HKEY_LOCAL_MACHINE 
    cR.SectionKey = "Software\Microsoft\Windows\CurrentVersion\Run" 
    cR.ValueKey = App.EXEName 
    cR.Default = "?" 
    cR.ValueType = REG_SZ 
    If (cR.Value = "?") Then 
        cR.SectionKey = "Software\Microsoft\Windows\CurrentVersion\RunOnce" 
        If (cR.Value = "?") Then 
            AutoRun = eNever 
        Else 
            AutoRun = eOnce 
        End If 
    Else 
        AutoRun = eAlways 
    End If
End Property 

Alıntıdır

__________________
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet odaları Benimmekan Mobil Sohbet
Cevapla

Etiketler
açılışında, başlaması, otomatik, programın, windows


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Şuhûdu'l-Hâl Geleneğinin Başlaması Kalemzede Tarih 0 01 Eylül 2011 15:40
Windows otomatik olarak kapansın! Slipknot Bilgisayar Donanımı 0 09 Ağustos 2010 16:53
Windows'a Otomatik Temizlik AngeL Windows 0 06 Nisan 2007 13:29