I'd like to make a login screen for a network admin program. Can anyone tell me how to place a login screen where you normally login for windows?
I would like it so that they can login to windows normally but instead of going to windows, it will load up my login screen and then it will work like the windows login.
So that means two login screens with the windows login style. How do i do that?
Example in projects is prefered. Thanks in advance
just change the startup file in the registry from explorer.exe to your program, then in your program shell explorer.exe after a person has inputed the correct user and pass.
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
actually if your in win98, open up the system.ini located in c:\windows then find the line that says shell=explorer.exe. change explorer.exe to the location of your program. then in your program shell explorer.exe after the correct user and pass is entered, its that simple.
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
I have a question about the shell= thing in System.Ini but instead of starting my own thread I'll reply here as it's sorta the same topic..
How can my VB program load up the System.Ini file, find the shell=explorer.exe (or even shell=litestep.exe - but lets not go there ) line, and modify that one line to shell my program instead then save the file?
I would think that you could use the API ini functions to edit the .ini.
VB Code:
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As Any, ByVal lsString As Any, ByVal lplFilename As String) As Long
Public Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPriviteProfileIntA" (ByVal lpApplicationname As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Function GetSetting(section As String, data As String)
Dim ret As Long
Dim Temp As String * 50
Dim lpDefault As String
ret = GetPrivateProfileString(section, data, lpDefault, Temp, Len(Temp), "c:\windows\system.ini")
GetSetting = Trim(Temp)
End Function
Public Function SaveSetting(section As String, data As String, lpString As String)
Dim ret As Long
ret = WritePrivateProfileString(section, data, lpString, "c:\windows\system.ini")
End Function
you call the functions like this
VB Code:
msgbox GetSetting("boot", "Shell")
to save to the ini use
VB Code:
SaveSetting("boot", "Shell", "c:\yourapp.exe")
that should work i think
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
I think that the only way is to reboot, or to logoff, and the obvious one is to logoff. So, show your login, authenticate the user, if its good then change the INI entry, or change it at the registry then use API to force logoff.
What you could do is use Shell to shell explorer, but make the Explorer it loads shell C:\Windows\Explorer.exe .. That will start it as a process I think.