-
Jan 22nd, 2000, 07:28 PM
#1
Thread Starter
Hyperactive Member
How can I start applications found in StartUp menu (I need to get list of them)
------------------
Thanks,
John, 14 years old
-
Jan 22nd, 2000, 07:37 PM
#2
So Unbanned
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
-
Jan 23rd, 2000, 01:53 AM
#3
Lively Member
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:
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|