elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Mensajes
Páginas: 1 ... 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 [1037] 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 ... 1235
10361  Programación / Scripting / [BATCH] [APORTE] TextFont Installer (Instalador automático de fuentes de texto) en: 24 Octubre 2012, 18:05 pm
Un pequeño code que me he hecho para automatizar la instalación de muchas fuentes de texto TTF u OTF EN WINDOWS 7...
Viene bien para ciertos casos así que aquí lo dejo por si alguien anda buscando algo parecido.

(Versión 0.2)



Código
  1. @ECHO OFF
  2. Mode con COLS=60 LINES=3
  3. TITLE Text Font Installer (By Elektro H@cker^) v0.2
  4. Nircmd win center ititle "Fuentes TrueType" 2>NUL
  5. COLOR 07
  6.  
  7. :: Modo de instalación normal
  8. REM Instalador.bat
  9. :: Modo de instalación recursiva
  10. REM Instalador.bat -R
  11.  
  12. Takeown /F "%SystemRoot%\Fonts" >NUL
  13. Icacls "%SystemRoot%\Fonts" /Grant "%USERNAME%":(F) >NUL
  14. Attrib -R -S "%SystemRoot%\Fonts" >NUL
  15.  
  16. IF /I "%~1" EQU "-R" (Set "DIR_RECURSIVE=/S" & Set "FOR_RECURSIVE=/R")
  17.  
  18. For /F %%X in ('Dir /B %DIR_RECURSIVE% "*.OTF"; "*.TTF" ^| FIND /V /C ""') Do (SET "Total=%%X")
  19.  
  20. For %FOR_RECURSIVE% %%# in (*.otf; *.ttf) DO (
  21. Set /A "Counter+=1"
  22. IF /I "%%~x#" EQU ".OTF" (Call SET "Font_Type=OpenType") ELSE (Call SET "Font_Type=TrueType")
  23. CALL Echo: Instalando fuentes de texto...  ( %%COUNTER%% de %%TOTAL%% ^)
  24. Echo: [+] %%~nx#
  25. CALL REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /V "%%~n# (%%Font_Type%%)" /D "%%~nx#" /F >NUL
  26. CALL REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts" /V "%%~n# (%%Font_Type%%)" /D "%%~nx#" /F >NUL
  27. COPY /Y "%%#" "%SystemRoot%\Fonts\" >NUL
  28. )
  29.  
  30. Echo: Las fuentes de texto se han instalado!
  31. Timeout /T 3



Versión alternativa del script (Se reduce el molesto efecto del borrado de pantalla, pero la ventana queda más pequeña, menos bonita xD)
Código
  1. @ECHO OFF
  2. Mode con COLS=60 LINES=5
  3. TITLE Text Font Installer (By Elektro H@cker^) v0.2
  4. Nircmd win center ititle "Fuentes TrueType" 2>NUL
  5. COLOR 07
  6.  
  7. :: Modo de instalación normal
  8. REM Instalador.bat
  9. :: Modo de instalación recursiva
  10. REM Instalador.bat -R
  11.  
  12. Takeown /F "%SystemRoot%\Fonts" >NUL
  13. Icacls "%SystemRoot%\Fonts" /Grant "%USERNAME%":(F) >NUL
  14. Attrib -R -S "%SystemRoot%\Fonts" >NUL
  15.  
  16. IF /I "%~1" EQU "-R" (Set "DIR_RECURSIVE=/S" & Set "FOR_RECURSIVE=/R")
  17.  
  18. For /F %%X in ('Dir /B %DIR_RECURSIVE% "*.OTF"; "*.TTF" ^| FIND /V /C ""') Do (SET "Total=%%X")
  19.  
  20. For %FOR_RECURSIVE% %%# in (*.otf; *.ttf) DO (
  21. Set /A "Counter+=1"
  22. IF /I "%%~x#" EQU ".OTF" (Call SET "Font_Type=OpenType") ELSE (Call SET "Font_Type=TrueType")
  23. CALL Echo: Instalando fuentes de texto...  ( %%COUNTER%% de %%TOTAL%% ^) | MORE
  24. Echo: [+] %%~nx#
  25. CALL REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /V "%%~n# (%%Font_Type%%)" /D "%%~nx#" /F >NUL
  26. CALL REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts" /V "%%~n# (%%Font_Type%%)" /D "%%~nx#" /F >NUL
  27. COPY /Y "%%#" "%SystemRoot%\Fonts\" >NUL
  28. CLS
  29. )
  30.  
  31. Echo: Las fuentes de texto se han instalado!
  32. Timeout /T 3

Saludos
10362  Programación / Scripting / Re: [RUBY] [WIN] IShack v1.3 (ImagesHack Uploader) ...(19/10/2012) en: 24 Octubre 2012, 11:20 am
Sensual código ! n_n

No te burles del mod!  :xD



NUEVA VERSIÓN 1.4 DISPONIBLE PARA DESCARGAR

PD: En el comentario principal
10363  Sistemas Operativos / Windows / Re: AYUDAAA no se nada de informatica en: 22 Octubre 2012, 01:38 am
Ya ves, algunas lecciones se aprenden a palos! (Como en esta ocasión)  :xD

Yo directamente en el HDD del SO no tengo ningún archivo ni muy importante ni poco importante, solamente el SO, y las aplicaciones instaladas, todo lo importante bien guardadito en otro(s) disco(s), es la mejor solución para evitar tanto pérdidas como preocupaciones, a ver si aprenden...

Saludos

10364  Programación / Scripting / Re: [BATCH] Ayuda para generar listas con impresoras en: 22 Octubre 2012, 01:13 am
Como ya te dije no dispongo del vbs para testear así que estos códigos los hago "a ojo", esto debería funcionar, sinó, modificalo un poco para arreglarlo:

Código
  1. @Echo OFF
  2.  
  3. :: By Elektro H@cker
  4.  
  5. REM FOR %%a in (pepe manolo elektro elhacker.net) DO (
  6. REM Set /A "NUM+=1"
  7. REM Call Set "Impresora%%NUM%%=%%a"
  8. REM )
  9.  
  10. FOR /F "tokens=3,*" %%a in ('cscript prnmngr.vbs -l ^| find "Nombre de impresora"') DO (
  11. Set /A "NUM+=1"
  12. Call Set "Impresora%%NUM%%=%%b"
  13. )
  14.  
  15. For /L %%a in (1,1,%NUM%) DO (
  16. Call Set "choices=%%choices%%%%a"
  17. Echo: [%%a] Impresora: %%Impresora%%a%% | MORE
  18. )
  19.  
  20. choice /C %CHOICES% /M "elige una impresora >> "
  21.  
  22. Echo: Has elegido la impresora "%%IMPRESORA%ERRORLEVEL%%%" | MORE
  23.  
  24. Pause&Exit

Te debería salir algo así:



PD: si no te sale, examina con detalle los tokens del primer FOR, ahí estará el problema y la solución...

Saludos.
10365  Programación / Scripting / Re: pasarle argumentos a un bat? en: 21 Octubre 2012, 09:41 am
Arrastrar un archivo y tomarlo como argumento es muy fácil.

La cosa se complica si quieres arrastrar VARIOS archivos, ya que todo se junta en una sola linea, y los archivos con espacios en el nombre llevarán comillas dobles ", y los que no tengan espacios en el nombre no llevarán delimitador, así que hay que comerse la cabeza para separar todos los elementos sin saber si habrá elementos con comillas dobles o no...

Aquí tienes un ejemplo muy claro con el que te puedes guiar:

[Batch] [Aporte] (O eso creo xD) Consola de reciclaje v1.0 by Elektro H@cker

 

PD: te dejo este for delimitador de comillas dobles por si llegas a necesitarlo:

Código
  1. setlocal EnableDelayedExpansion
  2. set "var=one"two"three"
  3. FOR /f tokens^=1-3^ delims^=^" %%a in ("!var!") do echo %%a--%%b--%%c

Saludos
10366  Programación / Scripting / Crear archivo .Bat autoejecutable en: 21 Octubre 2012, 09:08 am
El mensaje 'Crear archivo .Bat autoejecutable' fue bloqueado
post de hace 5 meses, revivido
Leer reglas:
http://foro.elhacker.net/reglas
10367  Programación / Scripting / Re: EJECUTAR ARCHIVO DESDE MSDOS en: 20 Octubre 2012, 18:44 pm
Bienvenido,

Como eres nuevo te daré un aviso...

- Los códigos deben ir entre la etiqueta [ code ] tal y como te lo he modificado.
- Está PROHIBIDO el uso abusivo de mayúsculas.

Espero que no se vuelva a repetir dos faltas al mismo tiempo...

Reglas: http://foro.elhacker.net/scripting/normas_del_tablon-t201567.0.html



Sobre el script, la gente confunde MS-DOS con la CMD, estás usando WinXP por lo tanto usas CMD.

Si tienes un problema con un código deberías especificar el error que tienes, el error que te dice la consola, para colaborar un poco ya que no somos adivinos, aunque esta vez se ve muy claro el error de ese code:


Si tienes la intención de usar caracteres latinos (áéíóúñ¿) primero tienes que activar el código de páginas latino para que la CMD pueda reconocer los caracteres:

Código
  1. @Echo OFF
  2. CHCP 1250 >NUL
  3. CD /D "c:\documents and settings\all users\documentos\mi música\música de muestra\" || (Echo la ruta no existe, escribela bien)
  4. Start /B h.wma
  5. Pause&Exit

Siento la charla.
Un saludo
10368  Media / Multimedia / Re: Duda sobre edición de vídeo sin pérdida de calidad. en: 20 Octubre 2012, 13:10 pm
Para mi Nero es como el Panda de los antivirus (Está ahi desde siempre, es archi-conocido, pero es una de las mayores basuras).

AviDemux (Y cualquier programa similar, menos NERO por lo que parece) trabaja con MPG sin recodificar.

AviDemux 2.6.0 (64 Bit) / Silent Install

http://fixounet.free.fr/avidemux/download.html

Un saludo
10369  Programación / Scripting / Re: [RUBY] Shack v1.1 (ImagesHack Uploader) en: 19 Octubre 2012, 16:33 pm
NUEVA VERSIÓN 1.2 DISPONIBLE PARA DESCARGAR





Gracias lo he intentado instalar en un sistema de 32 bits y me dio error.

Al final cree un nuevo instalador para la ocasion, que en 32 bits me trabaja correctamente.
Tienes razón, no lo testeé en win x86, pero puedes usar este script que ya funciona bien:

PD: el InnoUnp omite muchos flags importantes y muchos valores al desempaquetar, pero veo que te has manejado bien con eso.

Código:
;ISHACK v1.2 By Elektro H@cker

[Setup]
AppName=ISHACK (ImagesHack Uploader)
AppVerName=ISHACK (ImagesHack Uploader) v1.2
AppVersion=v1.2
DefaultDirName={pf}\Elektro H@cker Software\ISHACK
DefaultGroupName=ISHACK (ImagesHack Uploader)
OutputBaseFilename=ISHACK
AlwaysShowComponentsList=false
DisableDirPage=true
DisableProgramGroupPage=true
DisableReadyPage=true
DisableStartupPrompt=true
FlatComponentsList=false
PrivilegesRequired=none
RestartIfNeededByRun=false
ShowLanguageDialog=no
Compression=lzma/ultra
InternalCompressLevel=ultra
SolidCompression=true
InfoBeforeFile=embedded\InfoBefore.txt
WizardImageFile=embedded\WizardImage.bmp
WizardSmallImageFile=embedded\WizardSmallImage.bmp
ArchitecturesInstallIn64BitMode=x64
SetupIconFile=icono.ico
[Dirs]
Name: {pf}\Elektro H@cker Software\ISHACK

[Files]
Source: {sys}\ISHACK.exe; DestDir: {sys}
Source: {sys}\ISHACK.exe; DestDir: {syswow64}; Flags: noregerror
Source: {pf}\Elektro H@cker Software\ISHACK\ISHACK.ico; DestDir: {pf}\Elektro H@cker Software\ISHACK
Source: {userstartmenu}\CommandLine\ISHACK.bat; DestDir: {userstartmenu}\CommandLine

[Registry]
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: BMP; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.BMP\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: BMP; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: GIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.GIF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: GIF; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPEG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: JPG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: JPG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.JPG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: JPG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: PNG; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.PNG\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: PNG; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: TIF; flags: uninsdeletekey

Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueType: String; ValueData: Subir a ImagesHack; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueName: icon; ValueType: String; ValueData: {app}\ISHACK.ico; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack; ValueName: position; ValueType: String; ValueData: top; tasks: TIF; flags: uninsdeletekey
Root: HKCR; Subkey: SystemFileAssociations\.TIFF\shell\SubiraImagesHack\command; ValueType: String; ValueData: "CMD /Q /k ""Title ISHACK: ""%1"" & Mode con cols=80 lines=6 & Echo+ & Echo: ""%1"" | MORE & (For /f ""tokens=* skip=15"" %%a in ('ISHACK.exe -d ""%1""') do (Echo %%a & title ""%1"")) & (Pause>NUL)"""; tasks: TIF; flags: uninsdeletekey

[Run]
Filename: {userstartmenu}\CommandLine\ISHACK.bat; Description: Ejecutar ISHACK; Flags: nowait postinstall skipifsilent shellexec unchecked
Filename: ISHACK.exe; Parameters: -c; Description: Configurar ISHACK; Flags: nowait postinstall skipifsilent shellexec

[Tasks]
Name: BMP; Description: .BMP; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: GIF; Description: .GIF; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: JPG; Description: .JPEG/JPG; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: PNG; Description: .PNG; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""
Name: TIF; Description: .TIF/TIFF; Groupdescription: "Opción en el menú contextual: ""Subir a ImagesHack"""


¿Se podria poner en el instalador la opcion de borrar el archivo de configuracion y ocultar un poco el nombre y el usuario, usando un cifrado seguro con un poco de salt?
Las dos peticiones me parecen innecesarias, ni que fuese un programa de seguridad, o algo xD

Pero he tomado bastante en cuenta tu segunda petición. Eso sí, no me he esmerado mucho con la cifrado, este tipo de programa no necesita más...

PD: En el post principal tienes la nueva versión, y nuevo instalador.
PD2: Gracias por las sugerencias

Saludos
10370  Sistemas Operativos / Windows / Re: Cambie mi SO xP a Win 7 y mis archivos que estaban en letra verde ya no los veo en: 19 Octubre 2012, 04:23 am
Prueba esto: http://exoshare.com/download.php?uid=GIVKBOQR
Páginas: 1 ... 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 [1037] 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 ... 1235
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines