Results 1 to 3 of 3

Thread: Enum programs in StartUp menu

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Post


    How can I start applications found in StartUp menu (I need to get list of them)



    ------------------
    Thanks,
    John, 14 years old

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    Well since it's ONLY a folder and it's located at:
    C:\WINDOWS\START MENU\PROGRAMS\STARTUP
    it can be done easily
    Trying to make your own shell eh?
    Good Luck!

    ------------------
    DiGiTaIErRoR

  3. #3
    Lively Member
    Join Date
    Nov 1999
    Posts
    64

    Post

    But don't be fooled!! if the computer you are running has Windows Login enabled, or a network, the startup folder would be located:
    C:\WINDOWS\PROFILES\[username]\START MENU\PROGRAMS\STARTUP

    Be sure to add a User Login item, to see if a user is currently logged on.

    If the form, have a directory box named dir1 and a command button named command1 and a textbox named text1 (make it a pass box)
    Code:
    Private Sub command1_Click()
        MsgBox "The password you supplied was " & VerifyWindowsLoginUserPassword(text1.Text)
    end sub
    Private Sub Form_Load()
    on error goto 10
        uname = GetWindowsLoginUserID
        dir1.path = "c:\windows\profiles\" & uname & "\start menu\programs\startup\"
    
    exit sub
    
    10
    if err = 76 then  'Path not found
        dir1.path = "c:\windows\start menu\programs\startup\"
    end if
    resume next
    
    end sub
    in the declares of the form:
    Code:
    Option Explicit
    In a module file, put this:
    Code:
    Option Explicit
    
    Declare Function GetUserName Lib "advapi32.dll" Alias _
        "GetUserNameA" (ByVal lpBuffer As String, _
        nSize As Long) As Long
    
    Private Declare Function WNetVerifyPassword Lib "mpr.dll" Alias _
        "WNetVerifyPasswordA" (ByVal lpszPassword As String, _
        ByRef pfMatch As Long) As Long
    
    Public Function GetWindowsLoginUserID() As String
        Dim rtn As Long
        Dim sBuffer As String
        Dim lSize As Long
    
        lSize = Len(sBuffer)
        rtn = GetUserName(sBuffer, lSize)
        If rtn Then
            GetWindowsLoginUserID = sBuffer
        Else
            'error!
            GetWindowsLoginUserID = ""
        End If
        
    End Function
    
    Public Function VerifyWindowsLoginUserPassword(ByVal Password As String) As Boolean
        Dim rtn As Long, Match As Long
        rtn = WNetVerifyPassword(Password, Match)
        If rtn Then
            VerifyWindowsLoginUserPassword = False
        Else
            VerifyWindowsLoginUserPassword = (Match <> 0)
        End If
    End Function
    Hope this helps you out!

    Email me with questions.

    ------------------
    Charlie Jacquez
    16 Year Old Software Developer
    Email: cjwares@hotmail.com
    Web: CJWARES Online
    AIM: CJWARES, SlimmShadee2000, or BIOSzapper
    ICQ: 58493454
    I program: Basic, Visual Basic, HTML, and TI-Calculators
    My System Specs: Click here



    [This message has been edited by cjwares (edited 01-23-2000).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width