Jump to content

Logon Gyro


enneract
 Share

Recommended Posts

Windows 7 only supports specific oem logon backgrounds for 4:3 resolutions. This sucks for those of us who happens to end up using multiple aspect ratios. For me, it is because I use a 16:10 tablet pc, which means that quite frequently, it is actually 10:16.

the following script overcomes that limitation, with behavior functionally identical to the normal windows 7 logon screen behavior.

Thanks to KaFu for overcoming the issue that script execution would be halted while the actual logon screen was displayed... However, I found that it wasn't necessary after all.

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.6.1
 Author:         Enneract

 Script Function:
    Rotate windows 7 logon screen wallpaper to match any arbitrary resolution 
    changes. 

#ce ----------------------------------------------------------------------------

#NoTrayIcon

$path     = "C:\Windows\System32\oobe\info\backgrounds\"
$lasth    = @DesktopHeight
$lastw    = @DesktopWidth

GUICreate("", 0,0,0,0) 
GUIRegisterMsg(0x007E, "Display_Changed")

while 1
    sleep(10)
wend    

Func Display_Changed()  
    If $lasth <> @DesktopHeight OR $lastw <> @DesktopWidth Then
        FileCopy($path & "background" & @DesktopWidth & "x" & @DesktopHeight & ".jpg", $path & "backgroundDefault.jpg", 1) 
        $lasth    = @DesktopHeight
        $lastw    = @DesktopWidth
    EndIf
EndFunc
Edited by enneract
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...