IcyFerno Posted November 14, 2006 Share Posted November 14, 2006 i was just wondering if anyone of you could leave any comments. i need to run this script on one of my house computers as my brother always changes the wallpaper. i figured i could do this script as the administrative rights will still be retained. (my brother is below 12 ) Code: #NoTrayIcon Global $reg Global Const $dsw = @DesktopWidth Global Const $dsh = @DesktopHeight Global Const $Temp = @TempDir Global Const $url = "http://www.n4ls.net/tmp/background/index.php?w=" & $dsw & "&h=" & $dsh & "" Global Const $picture = ""& $Temp & "\Picture.bmp" If FileExists ($Picture) Then $sizenet = INetGetSize ($url) $sizelocal = FileGetSize ($Picture) If $sizenet = $sizelocal Then $reg = RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2" ) $reg += RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0" ) $reg = DllCall( "User32.dll", "int", "SystemParametersInfo", "int", 20, "int", 0, "string", $picture, "int", 0x02 ) Else INetGet ($url, $Picture) $reg = RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2" ) $reg += RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0" ) $reg = DllCall( "User32.dll", "int", "SystemParametersInfo", "int", 20, "int", 0, "string", $picture, "int", 0x02 ) EndIf ElseIf Not FileExists ($Picture) Then INetGet ($url, $Picture) $reg = RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2" ) $reg += RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0" ) $reg = DllCall( "User32.dll", "int", "SystemParametersInfo", "int", 20, "int", 0, "string", $picture, "int", 0x02 ) EndIf Link to comment Share on other sites More sharing options...
Mosquitos Posted November 15, 2006 Share Posted November 15, 2006 I don't know if it works but i googled and found this... [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop] "NoChangingWallPaper"=dword:00000001 Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
IcyFerno Posted November 15, 2006 Author Share Posted November 15, 2006 oh my god thanks so much! now i dont have to bother with the script :wink: thanks again Link to comment Share on other sites More sharing options...
kuh_kuh Posted November 21, 2006 Share Posted November 21, 2006 sorrythis url http://www.n4ls.net/tmp/background/index.php?w= don´t workt Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now