VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Personal StartUp As simple as it can get...

Hyperswede  (3 Submissions)   Windows System Services   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Do you use different user logins in Windows?
Tired of having the same StartUp folder just because the users share the same Start Menu?
Then this solves your problem!

Inputs
How to use personal startups. 1) Add the source code below to a new project. 2) Make an exe file. 3) Create a shortcut in your StartUp folder that points to the exe. 4) Log Out and Log In again as the person you want to give personal startup. 5) Check in the directory where you put the exe. 6) Open the file UserID.txt with notepad (Replace UserID with yor UserID) 7) Add the path of the files you want to start when windows starts, separate the paths of the different files by hitting enter. 8) Done!

Returns
Starts different programs on startup depending on the who has logged in.

Side Effects
None that i know of.

API Declarations
Declare Function WNetGetUser Lib "mpr" _
Alias "WNetGetUserA" (ByVal lpName As _
String, ByVal lpUserName As String, _
lpnLength As Long) As Long
Public Function UserID() As String
Dim sUserNameBuffer As String * 255
sUserNameBuffer = Space(255)
Call WNetGetUser(vbNullString, _
sUserNameBuffer, 255&)
UserID = Left$(sUserNameBuffer, _
InStr(sUserNameBuffer, _
vbNullChar) - 1)

If UserID = "" Then UserID = "default"
End Function

Rate Personal StartUp As simple as it can get... (102(102 Vote))
Personal StartUp As simple as it can get....bas

Personal StartUp As simple as it can get... Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters