MadXp's Logon Screen Changer This is an Application which can change your default Logon Screen of Windows XP. There are many applications that allow you to do this Application's like Logon Studio etc.
I have developed this simple application in WPF using Vb.Net. You can see how i made it by following the description below. The Application does Not use any DLL's nor does it use any API so it is very easy to understand.
Selecting The Logon Screen The logon Screen is an Exe file so in the OpenFileDialog I Added a Filter that will only show EXE Files.
The below given code will Allow the OpenFileDialog to only show Exe Files and once a file is selected it will add that filename to a ListBox and also check that the File is not already present in the ListBox.
Private Sub Add_One(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click Dim open As New OpenFileDialog() open.Filter = "Logon Files(*.exe)|*.exe|All Files(*.*)|*.*" If open.ShowDialog() = True Then Dim fileName As String fileName = open.FileName Dim it As String = fileName.Remove(0, fileName.LastIndexOf("\") + 1) If LogonList.Items.Contains(it) = False Then LogonList.Items.Add(it) path = open.FileName.Replace(it, "") Button3.IsEnabled = True Button2.IsEnabled = True Else MessageBox.Show(it & " Already Exist") End If Else End If End Sub
Changing the Image in the picture box to show preview of the seleted Logon Screen The code below will allow you to see preview of the selected Logon Screen when the user selects it from the ListBox.
Private Sub LogonList_SelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) Handles LogonList.SelectionChanged Dim bmp As New BitmapImage() Try bmp.BeginInit() bmp.StreamSource = New FileStream(path & LogonList.SelectedValue.ToString().Replace("exe", "jpg"), FileMode.Open) Catch ex As Exception bmp.StreamSource = New FileStream(Application.ResourceAssembly.Location.Replace("LogonChanger.exe", "Na.jpg"), FileMode.Open) ErrMess.Content = "To get a Preview Save an .JPG Image with the Same Name as of the Logon in the Same Folder. Example:logon.exe must also have logon.jpg" Finally bmp.EndInit() Image1.Source = bmp Image1.UpdateLayout() End Try TextBox1.Text = path & LogonList.SelectedValue.ToString() End Sub
Changing The Logn Screen The Logon screen is changed using an Registry Entry in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon ====> UIHOST is the value that changes the Logon Screen
I have Written this code on the Apply Seleted Button
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon", True).SetValue("UIHost", TextBox1.Text)
The TextBox1.Text holds the path to the selected Logon Screen
Restoring The Logon Screen To Default Now it was very important to restore the logon screen back to Windows default in case you dont like the logon screens So for setting the Logon Screen back to default i add This code to the Restore Back To Default button
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon", True).SetValue("UIHost", "logonui.exe")
For testing how your Logon Screen Looks Now it was very irritating for me to keep on logging off and seeing the Logon Screen So i used the Switch User Method. Now you can also use this method in the form of an Button Click in VB.Net For Switch Users and Quick Testing the Logon Screen i used this code on the TEST Button
Process.Start("rundll32.exe", "user32.dll,LockWorkStation")
The Following code was used to Switch Users Function.
Conclusion : I tried my level best to make it simple for you to understand the logic behind this application.if you still face any difficulties please feel free to contact me.
For Those who want to edit this project :I have some upgrade plans also so please contact me with your suggestions.
Regards Hefin Dsouza
Attachments
 Screen ShotsDownload The Full Application with Source Code (463-22259-LogonChanger.rar)
|
| Author: Kumar | Member Level: Silver | Revenue Score:  |
project file is missing ..pls post that file
|
| Author: Hefin Dsouza | Member Level: Diamond | Revenue Score:   |
To Run This Project you need to Have Visual Studio 2008 Service Pack 1 And .Net Framework 3.5 Service Pack 1
To Modify the Application you will also require Expression Blend 2 Service Pack 1
|
| Author: Sajib Barua | Member Level: Gold | Revenue Score:  |
Hi, I really liked this work.Thanks alot...
|
| Author: Abbas | Member Level: Gold | Revenue Score:  |
Dude your Application is not working check it out.
|
| Author: Shailesh Pisat | Member Level: Gold | Revenue Score:   |
Good Work. This is a good example of tweaking window registry and modifying windows system file. Hope such apps in future too.
Regards Shailesh Pisat
|