elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 06:52  


Tema destacado: Entra al canal IRC oficial de #elhacker.net

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [ Batch ] - (Aporte) Establecer imagen como Logon screen,Con un click del raton.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [ Batch ] - (Aporte) Establecer imagen como Logon screen,Con un click del raton.  (Leído 533 veces)
EleKtro H@cker
Moderador
***
Desconectado Desconectado

Mensajes: 1.348


(8) I will have that power!! (8) Jarkor! :D


Ver Perfil
[ Batch ] - (Aporte) Establecer imagen como Logon screen,Con un click del raton.
« en: 4 Noviembre 2011, 21:00 »

Hola aqui les dejo este script, mi último trabajillo xD.



Es un script para establecer cualquier imagen como fondo de... LOGON SCREEN! :P, Simplemente click derecho en la imagen > "establecer como logon wallpaper", eso es todo! Sin tener que abrir programas de terceros...y luego buscar el archivo...y luego que no se configure bien la imagen... en fin, sí, soy muy vago, y si tú también lo eres este script te servirá :).

Funciona con imagenes BMP, JPG, JPEG y PNG







¿Que es lo que hace exactamente el script?    ¿Cual es su commportamiento?

1. Identifica la resolución del monitor.
  2. Convierte la imagen a JPG, Y a la resolucion más aproximada del monitor (Sin perder aspect ratio).
   3. Reduce el tamaño de la imagen (Calidad) hasta -250 kb (Es lo máximo permitido para el logon screen de Windows 7).
 


Requisitos:
           Colous
           hex2dec
           Mediainfo (32 bit)
           Nircmd (32 Bit)
           irfanview (solamente el exe)
           Windows 7 x86/x64

(Todo va incluido en el RAR, Listo para instalar y usar.)

Notas: Ha sido testeado bajo windows 7 x64 (Con Dual Screen). No creo que de problemas en distintas configuraciones de pantalla bajo windows 7. En Windows XP es muy posible que las claves de registro cambien en este script, O no... xD

A mi me ha servido de mucho, lo posteo porque seguro que a alguien más le puede servir :).





Hago esto por diversión y ganas de aprender y compartir... Así que aqui dejo el batch y el registro que no quiero que el admin me regañe xD
 
Código:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\.BMP\shell\Establecer como Logon Wallpaper]
@="Establecer como Logon Wallpaper"
"icon"="C:\\\\windows\\\\system32\\\\shell32.dll,301"
"position"="middle"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.BMP\shell\Establecer como Logon Wallpaper\command]
@="\"C:\\Program Files\\EleKtrO HackeR\\Power Mouse Menu\\Establecer como Logon Wallpaper\\Change Logon Screen.bat\" \"%1\""


[HKEY_CLASSES_ROOT\SystemFileAssociations\.JPG\shell\Establecer como Logon Wallpaper]
@="Establecer como Logon Wallpaper"
"icon"="C:\\\\windows\\\\system32\\\\shell32.dll,301"
"position"="middle"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.JPG\shell\Establecer como Logon Wallpaper\command]
@="\"C:\\Program Files\\EleKtrO HackeR\\Power Mouse Menu\\Establecer como Logon Wallpaper\\Change Logon Screen.bat\" \"%1\""


[HKEY_CLASSES_ROOT\SystemFileAssociations\.JPEG\shell\Establecer como Logon Wallpaper]
@="Establecer como Logon Wallpaper"
"icon"="C:\\\\windows\\\\system32\\\\shell32.dll,301"
"position"="middle"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.JPEG\shell\Establecer como Logon Wallpaper\command]
@="\"C:\\Program Files\\EleKtrO HackeR\\Power Mouse Menu\\Establecer como Logon Wallpaper\\Change Logon Screen.bat\" \"%1\""


[HKEY_CLASSES_ROOT\SystemFileAssociations\.PNG\shell\Establecer como Logon Wallpaper]
@="Establecer como Logon Wallpaper"
"icon"="C:\\\\windows\\\\system32\\\\shell32.dll,301"
"position"="middle"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.PNG\shell\Establecer como Logon Wallpaper\command]
@="\"C:\\Program Files\\EleKtrO HackeR\\Power Mouse Menu\\Establecer como Logon Wallpaper\\Change Logon Screen.bat\" \"%1\""



Código
@echo off

REM EleKtrO HackeR

 
If not exist %1 (Exit)
 
 
###################################################################################################################################################### >nul 2>&1
 
 
:MENU
 
color 7
Mode con cols=80 lines=3
Title Logon Screen Changer by EleKtrO HackeR
 
Set QUALITY=80
 
Nircmd Win center ititle "Logon Screen Changer by EleKtrO HackeR"
 
For /F "Tokens=*" %%a in ('mediainfo %1 "--Inform=General;%%FileName%%"') do (Set FILE=%%a)
 
echo.
Colous writesec "[7] Estableciendo la imagen '[14]%FILE%[7]' ..."
ping -n 2 localhost >nul
 
###################################################################################################################################################### >nul 2>&1

 
REM Activar el Logon screen de Windows 7

 
 
Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /V "OEMBackground" /T "REG_DWORD" /D "00000001" /F >nul
 
 
###################################################################################################################################################### >nul 2>&1

 
REM IDENTIFICAR MONITOR

 
 
For /F "tokens=*" %%_ in ('REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\UnitedVideo\CONTROL\VIDEO"') DO (Set MONITOR=%%_)

 
REM IDENTIFICAR RESOLUCION X

 
 
For /F "tokens=1,2,3*" %%a in ('REG QUERY "%MONITOR%\0001" /V "DefaultSettings.XResolution" ^| find "REG_DWORD"') DO (
hex2dec.exe %%c | find "=" > "%TEMP%\WIDTH.txt"
For /F "tokens=1,2,3*" %%a in ('type "%TEMP%\WIDTH.txt"') DO (
Set WIDTH=%%c
)
)

 
REM IDENTIFICAR RESOLUCION Y

 
 
For /F "tokens=1,2,3*" %%a in ('REG QUERY "%MONITOR%\0001" /V "DefaultSettings.YResolution" ^| find "REG_DWORD"') DO (
hex2dec.exe %%c | find "=" > "%TEMP%\HEIGHT.txt"
For /F "tokens=1,2,3*" %%a in ('type "%TEMP%\HEIGHT.txt"') DO (
Set HEIGHT=%%c
)
)
 
 
###################################################################################################################################################### >nul 2>&1

 
REM CONVERTIR LA IMAGEN

 
 
:CONVERT
 
mkdir "%WINDIR%\System32\oobe\Info\backgrounds" >nul 2>&1
 
i_view32.exe %1 /resize=(%WIDTH%,%HEIGHT%) /aspectratio /resample /convert="%TEMP%\backgroundDefault.jpg" /jpgq=%QUALITY%
 
 
###################################################################################################################################################### >nul 2>&1

 
REM COMPROBAR EL TAMAÑO DEL ARCHIVO...

REM EL TAMAÑO MÁXIMO PERMITIDO PARA EL LOGON ES "250 Kbs"
 
 
mediainfo "%TEMP%\backgroundDefault.jpg" "--Inform=General;%%FileSize/String%%" | Find "MiB" >nul
If %ERRORLEVEL% EQU 0 (
SET /A QUALITY-=5
Goto :CONVERT
)
 
 
For /F "Tokens=1 delims=. " %%a in ('mediainfo "%TEMP%\backgroundDefault.jpg" "--Inform=General;%%FileSize/String%%"') do (Set kbs=%%a)
 
IF %KBS% GTR 249 (
SET /A QUALITY-=5
Goto :Convert
) ELSE (
move /Y "%TEMP%\backgroundDefault.jpg" "%WINDIR%\System32\oobe\Info\backgrounds\" >NUL 2>&1
goto :FIN
)
 
 
###################################################################################################################################################### >nul 2>&1

REM FINALIZAR LA TAREA...

 
 
:FIN
 
echo+
Colous writesec "[7] '[14]%FILE%[7]' Establecida correctamente."
ping -n 3 localhost >nul
 
DEL /Q "%TEMP%\HEIGHT.txt","%TEMP%\WIDTH.txt" >nul 2>&1
 
exit


« Última modificación: 4 Noviembre 2011, 21:21 por EleKtro H@cker » En línea

Siempre habrá alguien más ignorante que uno mismo, Como por ejemplo el nuevo presidente de la SGAE:

"La banda ancha es totalmente innecesaria para navegar convencionalmente, Solo sirve para descargar megas y megas grandisimos, Y tal."

PD: Volviendo a la era de los 56 k.

geormarsch

Desconectado Desconectado

Mensajes: 117



Ver Perfil
Re: [ Batch ] - (Aporte) Establecer imagen como Logon screen,Con un click del raton.
« Respuesta #1 en: 4 Noviembre 2011, 21:10 »

Bueenisimo Aporte.... Bravo....


En línea

I Can Fly

----------------------

I Love Batch!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Como hacer que el raton vaya a un punto y haga click
Programación Visual Basic
Log-On 1 362 Último mensaje 9 Septiembre 2006, 08:50
por Gorky
Nuevo ratón Razer Pro Click Mobile para portátiles
Noticias
YaTaMaS 1 269 Último mensaje 16 Septiembre 2007, 01:16
por Red Mx
Mi primer "Logon Splash Screen" para web
Diseño Gráfico
Syphroot 0 1,522 Último mensaje 16 Mayo 2008, 10:01
por Syphroot
Simular click de raton
.NET
Gorky 7 4,111 Último mensaje 11 Septiembre 2009, 05:01
por Zzombi
establecer una imagen como fondo de dialogo?
Programación C/C++
RHL 0 96 Último mensaje 28 Marzo 2012, 00:56
por RHL
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines