|
8091
|
Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE] mrtzcmp3 Downloader
|
en: 26 Octubre 2013, 18:31 pm
|
no se porque parece que ocupa más memoria RAM... Un RegEx reserva más memoria y es lento en comparación, tarda más en inicializarse y en finalizar su ejecución (Lease las diferentes RegExOptions para ajustar un poco estas caracteristicas). Según un test de velocidad que acabo de realizar para decodificar 1.000.000 de strings, estos han sido los resultados: Método 1 (Regex.Replace): 11.826 segundos Método 2 (String Append): 6.201 segundos Óbviamente, para procesar una efímera cantidad de urls, no importa en absoluto que método se use ya que la diferencia en ms no se podrá apreciar. Saludos.
|
|
|
8092
|
Programación / Programación General / Re: Archivo bat Windows 7
|
en: 26 Octubre 2013, 18:12 pm
|
Hola ¿Seriáis tan amables de proporcionarme una solución? 1. Las variables especiales de FOR solo pueden contener un caracter, y van del rango A-Z plus algunos caracteres especiales: 2. Hay varios tipos de FOR, para procesar un rango número se usa el modificador /L: 3. La sintaxis del comando Start es: START "" "PracticaSSIIBat.exe argumentos"
4. Porfavor, usa las etiquetas para añadir código, y postea las dudas de Batch en el subforo de Scripting. He probado varias cosas pero nada funciona. Se denota que has probado de todo pero no has probado a leer un manual básico del lenguaje. Saludos!
|
|
|
8093
|
Sistemas Operativos / Windows / Re: como editar mi sistema operativo windows !
|
en: 26 Octubre 2013, 17:46 pm
|
Hey en donde encuentro un manual de esos??? Si lo quieres en Castellano entonces puedes encontrar tutoriales en el buscador de cualquier foro de temática Hacking como este... aunque, ya sabes lo que te vas a encontrar (contenido cutre, en la mayoría de los casos son documentos redactados por gente que no sabe lo suficiente sobre lo que está escribiendo). Si lo quieres en Inglés, también tienes una grandiosa cantidad donde elegir... desde libros en Amazon como tutoriales online: -> http://www.tenouk.com/ModuleO.htmlEse es bueno, y arriba del todo de la página tienes los botones para pasar las páginas de los módulos.
puedes contestar unas preguntas sobre windows 8: Pues me lo he pensado, no soy un Bot ni me pagan por contestar, pero ...está bien xD
1) Hay alguna forma de poner un menu de inicio similar al de windows 7?? No me andaré con rodeos, hay muchos, pero StartIsBack es el mejor (en mi opinión). -> http://www.startisback.com/
2) Porque hay drivers que no funcionan de igual manera en windows 8 como lo han hecho con windows 7? tenia entendido que si funcionaba, pero me lleve una sorpresa al instalar los sims 3, no me reconocia la tarjeta, tenia que jugar con las menores caracteristicas, usando una Ati Radeon HD 6450, y pues bueno, en windows 7 funcionaba fenomenal. No puedo contestarte con seguridad, no soy un experto en Hardware, pero ya sabes como es el tema de la compatibilidad cuando sale a la luz una nueva generación de Windows (generación, no versión). (Imagino que ya habrás probado a activar la compatibilidad de programas de Windows para especificar que el proceso corría bien en Windows 7) Quizás exista alguna actualización/parche/bugfix de compatibilidad en la página oficial de los Sims para Windows 8, o puedes intnetar actualizar los drivers de tu ATI.
3) Tienes pensado hacer un post grandiosos para Activar-Desactivar caracteristicas en windows 8?? -> By Elektro H@cker - Tips interesantes que deberías conocer para exprimir Windows 8-> By Elektro H@cker - Menúes en cascada para Windows 8
Hablando de eso, mira, tuve problemas instalando, puede que ya haya preguntado, pero fue hace rato, y como volvi a windows 7, usando el paquete que nos regalaste Mega-Pack Tips Windows 7 x64 (un regalo de los dioses, sos grande, muchas gracias maese) me sale lo siguiente cuando trato de instalar todas las herramientas: No tienes de que preocuparte, en los scripts yo usaba la aplicación NIRCMD para centrar la ventana de la CMD a la pantalla y para detener la ejecución del script, pero como tu no dispones de la aplicación sale ese mensaje de error. reemplaza: por: 4) Y ultima pregunta: Windows 7 (Completamente Actualizado + Mega-Pack Tips Windows 7 x64) vs Paquete de vs Windows 8.1 (Completamente Actualizado, olvidando esa idiotez de la tablet para dummies)??? Si me das a elegir entre windows 8.1 o 7, y suponiendo que te vayas a instalar la orbe de inicio, entonces sin lugar a dudas Windows 8.1. Pero si eres muy Gamer de los Sims y no puedes solucionar el inconveniente de la compatibilidad pues no se... es tu decisión no la mia! (No me voy a poner a explicar ventajas entre win8 y win7 si es lo que buscas, ya hay posts de eso donde yo y tros compañeros han comentado en el foro xD) Un saludo!
|
|
|
8094
|
Sistemas Operativos / Windows / Re: [APORTE] Tips interesantes que deberías conocer para exprimir Windows 8
|
en: 26 Octubre 2013, 17:45 pm
|
Revivo este post para añadir un script al que lo llamo " Perfil de Sistema", a petición para el usuario dato000Esto es un script que corro (en conjunto con otro tipo de utilidades) después de una instalación de Windows 8 para preconfigurar (añadir, modificar o eliminar) muchas caracteristicas de Windows 8 relacionadas con el SO, el Explorer, Panel de control, menú contextual, dispositivos, redes, etc... Esto lo comparto para que examinen las caracteristicas que modifico (Leasen los "Echo" dentro del script), y eliminen las caracteristicas que no quieren modificar, hagan lo que quieran con esto xD. PD: Porfavor, no ejecutar el archivo sin mirarlo detalládamente, hay cosas que quizas no quieran o no deban desactivar, como por ejemplo los servicios de sus dispositivos de redes, las DNS de Google, o el salvapantallas preconfigurado. PD2: No hay peligro de ningún tipo, pero ya saben, si no se lo miran antes de ejecutarlo pueden perder la conectividad de red por lo que he mencionado en la postdata 1, no me hago responsable del mal uso de este script.@Echo OFF
Title Perfil de sistema por defecto (By Elektro H@cker^)
Echo+ Echo :: ############### Echo :: Barra de tareas Echo :: ############### Echo+
Echo [+] Desagrupar iconos del system tray REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /V "EnableAutoTray" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] No agrupar las instancias del mismo programa REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /V "TaskbarGlomLevel" /T "REG_DWORD" /D "0x00000002" /F >NUL 2>&1
Echo [+] Ocultar la barra de Idioma REG ADD "HKLM\Software\Microsoft\CTF\LangBar" /V "ShowStatus" /T "REG_DWORD" /D "0x00000003" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\CTF\LangBar" /V "ShowStatus" /T "REG_DWORD" /D "0x00000003" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\CTF\LangBar" /V "LABEL" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\CTF\MSUTB\DontShowCloseLangBarDlg" /V "LABEL" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar las notificaciones del "Centro de seguridad" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "HideSCAHealth" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "HideSCAHealth" /F >NUL 2>&1
Echo+ Echo :: :: ### Echo :: :: CMD Echo :: :: ### Echo+
Echo [+] Codificacion REG ADD "HKCU\Software\Microsoft\Command Processor" /V "Autorun" /T "REG_SZ" /D "chcp 1252 >NUL 2>&1" /F >NUL 2>&1
Echo [+] Fuente rem REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "FaceName" /T "REG_SZ" /D "Lucida Console" /F >NUL 2>&1 rem REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "FontSize" /T "REG_DWORD" /D "0x000e0000" /F >NUL 2>&1 rem REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "FontFamily" /T "REG_DWORD" /D "0x00000036" /F >NUL 2>&1
Echo [+] Color de texto REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "ScreenColors" /T "REG_DWORD" /D "0x00000007" /F >NUL 2>&1
Echo [+] Capacidad del buffer REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "HistoryBufferSize" /T "REG_DWORD" /D "0x00000096" /F >NUL 2>&1 REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "NumberOfHistoryBuffers" /T "REG_DWORD" /D "0x00000006" /F >NUL 2>&1
Echo [+] Modo de edicion rapida REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "QuickEdit" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Variable de entorno "DOWNLOADS" SETX Downloads "%userprofile%\Downloads" >NUL 2>&1
Echo+ Echo :: ######## Echo :: Explorer Echo :: ######## Echo+
Echo [+] Desocultar carpeta "%Programdata%" attrib -h "%Programdata%"
Echo [+] Desocultar carpeta "%appdata%" attrib -h "%appdata%"
Echo [+] Ocultar carpeta "%public%" attrib +h "%public%"
Echo [+] Activar las casillas para seleccionar elementos REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "AutoCheckSelect" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar controladores de vista previa en el panel de vista previa REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "ShowPreviewHandlers" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Desactivar el asistente para compartir en carpetas REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "SharingWizardOn" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Desactivar el panel de navegacion REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer" /V "PageSpaceControlSizer" /T "REG_BINARY" /D "a000000000000000000000001c010000" /F >NUL 2>&1
Echo [+] Desactivar la carpeta Librerias REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" /F >NUL 2>&1
Echo [+] Deshabilitar la busqueda automatica de carpetas compartidas y equipos de red for /F "delims= " %%a in ('"wmic useraccount where name='%UserName%' get sid" ^| MORE +1') do ( reg add "HKEY_USERS\%%a\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "NoNetCrawling" /T "REG_DWORD" /D "1" /F >NUL 2>&1 )
Echo [+] Establecer perfil de vista de "Archivos generales" para todas las carpetas REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V "FolderType" /T "REG_SZ" /D "NotSpecified" /F >NUL 2>&1
Echo [+] Mostrar archivos protegidos del sistema REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "ShowSuperHidden" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Mostrar las extensiones de archivos REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "HideFileExt" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Ocultar menus en las carpetas REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "AlwaysShowMenus" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Ocultar unidades de disco vacias en la carpeta Equipo REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "HideDrivesWithNoMedia" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Ocultar este PC en el explorador de equipos de una PC remota REG ADD "HKLM\SYSTEM\ControlSet001\services\LanmanServer\Parameters" /V "Hidden" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet002\services\LanmanServer\Parameters" /V "Hidden" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /V "Hidden" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Permitir la modificación de la imagen de la pantalla LockScreen REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /V "NoChangingLockScreen" /F >NUL 2>&1
Echo [+] Desactivar Aero Peek REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "DisablePreviewDesktop" /T "REG_DWORD" /D "1" /F >NUL 2>&1
Echo [+] Renombrar la carpeta "Equipo" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /V "" /D "ElektroStudios" /F >NUL 2>&1
Echo [+] Añadir ".:: Modo Dios ::." al panel de control REG ADD "HKLM\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "" /D ".: Modo Dios :." /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "InfoTip" /T "REG_SZ" /D "Todo lo que Dios puede hacer..." /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "System.ControlPanel.Category" /T "REG_SZ" /D "5" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}\DefaultIcon" /V "" /D "%%SystemRoot%%\\System32\\imageres.dll,-27" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}\Shell\Open\Command" /V "" /D "explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "" /D ".: Modo Dios :." /F >NUL 2>&1
Echo [+] Mostrar la letra de la unidad a la izquierda for /F "delims= " %%a in ('"wmic useraccount where name='%UserName%' get sid" ^| MORE +1') do ( reg add "HKEY_USERS\%%a\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowDriveLettersFirst" /T "REG_DWORD" /D "4" /F >NUL 2>&1 )
Echo [+] Restaurar las carpetas abiertas al reiniciar Windows for /F "delims= " %%a in ('"wmic useraccount where name='%UserName%' get sid" ^| MORE +1') do ( REG ADD "HKEY_USERS\%%a\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "PersistBrowsers" /T "REG_DWORD" /D "1" /F >NUL 2>&1 ) Echo [+] Tamaño de la vista del panel de control REG ADD "HKEY_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage" /V "StartupPage" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /V "AllItemsIconView" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Mostrar conflictos de combinacion de carpeta REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V "HideMergeConflicts" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
REM Echo [+] Mostrar extension de archivos .lnk REM REG DELETE "HKEY_CLASSES_ROOT\lnkfile" /V "NeverShowExt" /F >NUL 2>&1
Echo [+] Mostrar extension de archivos .url REG DELETE "HKEY_CLASSES_ROOT\InternetShortcut" /V "NeverShowExt" /F >NUL 2>&1
Echo [+] Mostrar extension de archivos .pif REG DELETE "HKEY_CLASSES_ROOT\piffile" /V "NeverShowExt" /F >NUL 2>&1
Echo [+] Mostrar extension de archivos .SHC REG DELETE "HKEY_CLASSES_ROOT\SHCmdFile" /V "NeverShowExt" /F >NUL 2>&1
Echo [+] Mostrar extension de archivos .xnk REG DELETE "HKEY_CLASSES_ROOT\xnkfile" /V "NeverShowExt" /F >NUL 2>&1
Echo+ Echo :: ############### Echo :: Menu contextual Echo :: ############### Echo+
Echo [+] Eliminar opcion: Nuevo ^> BMP REG DELETE "HKCR\.bmp\ShellNew" /V "Nullfile" /F >NUL 2>&1
Echo [+] Eliminar opcion: Nuevo ^> Contacto REG DELETE "HKCR\.contact\ShellNew" /F >NUL 2>&1
Echo [+] Eliminar opcion: Nuevo ^> Documento de Windows journal REG DELETE "HKCR\.jnt\jntfile\ShellNew" /F >NUL 2>&1
Echo [+] Eliminar opcion: Nuevo ^> ATL MFC Trace Tool settings file REG DELETE "HKCR\.trc\ShellNew" /V "Nullfile" /F >NUL 2>&1
Echo [+] Eliminar opcion: Nuevo ^> Zip REG DELETE "HKCR\.zip\ShellNew" /F >NUL 2>&1
Echo [+] Desactivar límite de 15 archivos REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /V "MultipleInvokePromptMinimum" /T "REG_DWORD" /D "0x00002710" /F 1>NUL
Echo [+] Añadir opcion: Desempaquetar MSI REG ADD "HKCR\Msi.Package\shell\Desempaquetar MSI" /V "icon" /T "REG_SZ" /D "msiexec.exe" /F 1>NUL REG ADD "HKCR\Msi.Package\shell\Desempaquetar MSI" /V "position" /T "REG_SZ" /D "top" /F 1>NUL REG ADD "HKCR\Msi.Package\shell\Desempaquetar MSI\command" /V "" /D "msiexec.exe /a \"%%1\" /qb TARGETDIR=\"%%1 Contents\"" /F 1>NUL
Echo [+] Añadir opcion: Seleccionar REG ADD "HKCR\*\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F >NUL 2>&1 REG ADD "HKCR\*\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F >NUL 2>&1 REG ADD "HKCR\*\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F >NUL 2>&1 REG ADD "HKCR\*\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F >NUL 2>&1
REG ADD "HKCR\Folder\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F >NUL 2>&1 REG ADD "HKCR\Folder\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F >NUL 2>&1 REG ADD "HKCR\Folder\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F >NUL 2>&1 REG ADD "HKCR\Folder\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F >NUL 2>&1
REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F >NUL 2>&1 REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F >NUL 2>&1 REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F >NUL 2>&1 REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall" /F >NUL 2>&1
REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F >NUL 2>&1 REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F >NUL 2>&1 REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F >NUL 2>&1 REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F >NUL 2>&1
Echo [+] Menu contextual - Cambiar icono de la opcion "Editar" REG ADD "HKCR\SystemFileAssociations\image\shell\edit" /V "icon" /T "REG_SZ" /D "mspaint.exe" /F >NUL 2>&1 REG ADD "HKCR\SystemFileAssociations\text\shell\edit" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1 REG ADD "HKCR\batfile\shell\edit" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1 REG ADD "HKCR\cmdfile\shell\edit" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1 REG ADD "HKCR\regfile\shell\edit" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1 REG ADD "HKCR\vbsFile\Shell\Edit" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1
Echo [+] Menu contextual - Eliminar opcion "Anclar al inicio" REG DELETE "HKCR\Folder\shell\pintostartscreen" /F >NUL 2>&1
Echo [+] Añadir cascada de opciones: Accesorios de Windows REG ADD "HKCR\DesktopBackground\Shell\Accesorios" /V "MUIVerb" /T "REG_SZ" /D "Accesorios de Windows" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\Accesorios" /V "SubCommands" /T "REG_SZ" /D "Bloc.de.notas;Calculadora;Grabadora.de.sonidos;Grabacion.de.acciones;Lupa;Mapa.de.caracteres;Notas;Paint;Programador.de.tareas;Recortes;Teclado.virtual" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\Accesorios" /V "icon" /T "REG_SZ" /D "imageres.dll,-109" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\Accesorios" /V "position" /T "REG_SZ" /D "Bottom" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc.de.notas" /V "" /D "Bloc de notas" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc.de.notas" /V "icon" /T "REG_SZ" /D "notepad.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc.de.notas\command" /V "" /D "notepad.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora" /V "" /D "Calculadora" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora" /V "icon" /T "REG_SZ" /D "calc.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora\command" /V "" /D "calc.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora.de.sonidos" /V "" /D "Grabadora de sonidos" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora.de.sonidos" /V "icon" /T "REG_SZ" /D "SoundRecorder.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora.de.sonidos\command" /V "" /D "SoundRecorder.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion.de.acciones" /V "" /D "Grabación de acciones" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion.de.acciones" /V "icon" /T "REG_SZ" /D "psr.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion.de.acciones\command" /V "" /D "psr.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lupa" /V "" /D "Lupa" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lupa" /V "icon" /T "REG_SZ" /D "magnify.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Lupa\command" /V "" /D "magnify.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa.de.caracteres" /V "" /D "Mapa de caracteres" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa.de.caracteres" /V "icon" /T "REG_SZ" /D "charmap.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa.de.caracteres\command" /V "" /D "charmap.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas" /V "" /D "Notas" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas" /V "icon" /T "REG_SZ" /D "StikyNot.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas\command" /V "" /D "StikyNot.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint" /V "" /D "Paint" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint" /V "icon" /T "REG_SZ" /D "mspaint.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint\command" /V "" /D "mspaint.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Programador.de.tareas" /V "" /D "Programador de tareas" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Programador.de.tareas" /V "icon" /T "REG_SZ" /D "miguiresource.dll,1" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Programador.de.tareas\command" /V "" /D "Control schedtasks" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes" /V "" /D "Recortes" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes" /V "icon" /T "REG_SZ" /D "SnippingTool.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes\command" /V "" /D "SnippingTool.exe" /F >NUL 2>&1
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Teclado.virtual" /V "" /D "Teclado virtual" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Teclado.virtual" /V "icon" /T "REG_SZ" /D "osk.exe" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Teclado.virtual\command" /V "" /D "osk.exe" /F >NUL 2>&1
Echo [+] Añadir cascada de opciones: Plan de Energia REG ADD "HKCR\DesktopBackground\Shell\PowerPlan" /V "MUIVerb" /T "REG_SZ" /D "Plan de Energía" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\PowerPlan" /V "SubCommands" /T "REG_SZ" /D "PowerPlan.Equilibrado;PowerPlan.Economizador;PowerPlan.Alto.Rendimiento" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\PowerPlan" /V "Icon" /T "REG_SZ" /D "powercpl.dll" /F >NUL 2>&1 REG ADD "HKCR\DesktopBackground\Shell\PowerPlan" /V "Position" /T "REG_SZ" /D "Bottom" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Alto.Rendimiento" /V "" /D "Alto Rendimiento" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Alto.Rendimiento" /V "Icon" /T "REG_SZ" /D "powercpl.dll" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Alto.Rendimiento\command" /V "" /D "powercfg.exe /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Equilibrado" /V "" /D "Equilibrado" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Equilibrado" /V "Icon" /T "REG_SZ" /D "powercpl.dll" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Equilibrado\command" /V "" /D "powercfg.exe /setactive 381b4222-f694-41f0-9685-ff5bb260df2e" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Economizador" /V "" /D "Economizador" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Economizador" /V "Icon" /T "REG_SZ" /D "powercpl.dll" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PowerPlan.Economizador\command" /V "" /D "powercfg.exe /setactive a1841308-3541-4fab-bc81-f71556f20b4a" /F >NUL 2>&1
Echo+ Echo :: ######## Echo :: Hardware Echo :: ######## Echo+
Echo [+] Aumentar la sensibilidad del Raton REG ADD "HKCU\Control Panel\Mouse" /V "MouseSensitivity" /T "REG_SZ" /D "16" /F >NUL 2>&1
Echo [+] Desactivar el Sistema de cifrado de archivos EFS fsutil behavior set disableencryption 1 >NUL 2>&1
Echo [+] Desactivar la creación automática de nombres cortos fsutil behavior set Disable8dot3 1 >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "NtfsDisable8dot3NameCreation" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar la marca de último acceso de archivos fsutil behavior set DisableLastAccess 1 >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "ntfsdisablelastaccessupdate" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar la encriptacion EFS de archivos REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "NtfsDisableEncryption" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Deshabilitar la desfragmentación de inicio REG ADD "HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction" /V "Enable" /T "REG_SZ" /D "N" /F >NUL 2>&1
Echo [+] Velocidad del cursor del teclado REG ADD "HKCU\Control Panel\Desktop" /V "CursorBlinkRate" /T "REG_SZ" /D "200" /F >NUL 2>&1
Echo [+] GPU Hang TimeOut REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" /V "TdrDelay" /T "REG_DWORD" /D "0x0000000a" /F >NUL 2>&1
Echo [+] No limpiar la memória virtual al apagar el sistema REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /V "ClearPageFileAtShutdown" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo+ Echo :: ##### Echo :: REDES Echo :: ##### Echo+
Echo [+] Desactivar la compartición automatica de redes REG ADD "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /V "AutoShareWks" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet001\services\LanmanServer\Parameters" /V "AutoShareWks" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet002\services\LanmanServer\Parameters" /V "AutoShareWks" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Establecer las nuevas redes encontradas como "Publicas" REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" /V "Category" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Deshabilitar Cliente para redes Microsoft netcfg /u ms_msclient >NUL 2>&1
Echo [+] Deshabilitar Controlador de E/S del asignador de deteccion de topologias netcfg /u ms_lltdio >NUL 2>&1
Echo [+] Deshabilitar Compartir impresoras y archivos para redes Microft netcfg /u ms_server >NUL 2>&1
Echo [+] Deshabilitar Filtro ligero de captura de NDIS netcfg /u ms_ndiscap >NUL 2>&1
Echo [+] Deshabilitar NetBios Interface netcfg /u ms_netbios >NUL 2>&1
Echo [+] Deshabilitar NetBios SMB netcfg /u ms_smb >NUL 2>&1
Echo [+] Deshabilitar Programador de paquetes QoS netcfg /u ms_pacer >NUL 2>&1
Echo [+] Deshabilitar Protocolo de Internet version 6 (TCPIP v6) netcfg /u ms_tcpip6 >NUL 2>&1
Echo [+] Deshabilitar Respondedor de deteccion de topologias de nivel de vinculo netcfg /u ms_rspndr >NUL 2>&1
Echo [+] Deshabilitar WFP Lightweight Filter netcfg /u ms_wfplwf >NUL 2>&1
Echo [+] Deshabilitar la reserva de ancho de banda de QoS REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\PSched" /V "NonBestEffortLimit" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
rem Echo [+] Usar las DNS de Google rem For /F "Tokens=*" %%# in ('Reg query "HKLM\SYSTEM\ControlSet001\services\Tcpip\Parameters\Interfaces"') do ( rem Reg ADD "%%#" /V "NameServer" /D "8.8.8.8,8.8.4.4" /F >NUL 2>&1 rem )
Echo+ Echo :: ####### Echo :: Sistema Echo :: ####### Echo+
Echo [+] Eliminar opción: "Buscar otra aplicacion en la Tienda de Windows" REG ADD "HKCU\Software\Policies\Microsoft\Windows\Explorer" /V "NoUseStoreOpenWith" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /V "NoUseStoreOpenWith" /F >NUL 2>&1
Echo [+] Cantidad de scrolls de pagina al mover la rueda del raton REG ADD "HKCU\Control Panel\Desktop" /V "WheelScrollChars" /T "REG_SZ" /D "10" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\Desktop" /V "WheelScrollLines" /T "REG_SZ" /D "10" /F >NUL 2>&1
Echo [+] Capacidad de la papelera de reciclaje for /F "tokens=*" %%a in ('Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume"') do ( reg add "%%a" /v "MaxCapacity" /T "REG_DWORD" /D "999999" /F >NUL 2>&1 )
Echo [+] Configuracion predeterminada del salvapantallas de texto REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "AllScreensSame" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "SurfaceType" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "Specular" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "SurfaceColor" /T "REG_DWORD" /D "0x00777777" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "CustomTexture" /T "REG_SZ" /D "" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "CustomEnvironment" /T "REG_SZ" /D "" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "UseCustomColor" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "UseCustomTexture" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "UseCustomEnvironment" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "MeshQuality" /T "REG_DWORD" /D "0x00000320" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "Size" /T "REG_DWORD" /D "0x0000000a" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "RotationSpeed" /T "REG_DWORD" /D "0x00000008" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "RotationStyle" /T "REG_DWORD" /D "0x00000003" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "DisplayString" /T "REG_SZ" /D "Elektro Studios" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "DisplayTime" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontWeight" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontHeight" /T "REG_DWORD" /D "0x00000060" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontItalic" /T "REG_DWORD" /D "0x01000000" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontCharSet" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontPitchFamily" /T "REG_DWORD" /D "0x61005400" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /V "FontFace" /T "REG_SZ" /D "Tahoma" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\Desktop" /V "SCRNSAVE.EXE" /T "REG_SZ" /D "%windir%\system32\ssText3d.scr" /F >NUL 2>&1
Echo [+] Desactivar aviso de poco espacio en disco duro REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "NoLowDiskSpaceChecks" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar aviso de seguridad al abrir archivos REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /V "SaveZoneInformation" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /V "LowRiskFileTypes" /T "REG_SZ" /D ".avi;.bat;.com;.cmd;.exe;.htm;.html;.mpg;.mpeg;.mov;.mp3;.msi;.m3u;.rar;.reg;.txt;.vbs;.wav;.zip;.url;" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments" /V "SaveZoneInformation" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations" /V "LowRiskFileTypes" /F >NUL 2>&1
Echo [+] Desactivar la organizacion de la ventana al moverla al borde de la pantalla REG ADD "HKCU\Control Panel\Desktop" /V "WindowArrangementActive" /T "REG_SZ" /D "0" /F >NUL 2>&1
Echo [+] Desactivar UAC REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /V "ConsentPromptBehaviorAdmin" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /V "EnableLUA" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Desactivar Windows Flip3D for /F "delims= " %%a in ('"wmic useraccount where name='%UserName%' get sid" ^| MORE +1') do ( reg add "HKEY_USERS\%%a\Software\Policies\Microsoft\Windows\DWM" /v "DisallowFlip3D" /T "REG_DWORD" /D "1" /F >NUL 2>&1 )
Echo [+] Deshabilitar Cliente de impresion en internet dism /online /disable-feature /featurename:"TFTP" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Cliente TFTP dism /online /disable-feature /featurename:"Printing-Foundation-InternetPrinting-Client" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Fax y escaner de Windows dism /online /disable-feature /featurename:"FaxServicesClientPackage" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Internet Explorer dism /online /disable-feature /featurename:"Internet-Explorer-Optional-amd64" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Juegos de Windows dism /online /disable-feature /featurename:"InboxGames" /quiet /norestart >NUL 2>&1 dism /online /disable-feature /featurename:"More Games" /quiet /norestart >NUL 2>&1 dism /online /disable-feature /featurename:"Internet Games" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Monitor de puerto de LPR dism /online /disable-feature /featurename:"Printing-Foundation-LPRPortMonitor" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Servicios XPS dism /online /disable-feature /featurename:"Printing-XPSServices-Features" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Tablet PC dism /online /disable-feature /featurename:"TabletPCOC" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Visor de XPS dism /online /disable-feature /featurename:"Xps-Foundation-Xps-Viewer" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Windows media center dism /online /disable-feature /featurename:"MediaCenter" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Windows media playback dism /online /disable-feature /featurename:"MediaPlayback" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Windows media player dism /online /disable-feature /featurename:"WindowsMediaPlayer" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar Power Shell dism /online /disable-feature /featurename:"MicrosoftWindowsPowerShellV2" /quiet /norestart >NUL 2>&1 dism /online /disable-feature /featurename:"MicrosoftWindowsPowerShellV2Root" /quiet /norestart >NUL 2>&1
Echo [+] Deshabilitar la opción "Añadir características" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\WAU" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\WAU" /V "Disabled" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\WAU" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\WAU" /V "Disabled" /F >NUL 2>&1
Echo [+] Eliminar el sufijo "ACCESO DIRECTO" de los accesos directos Reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "link" /T "REG_BINARY" /D "00 00 00" /F >NUL 2>&1 Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "link" /T "REG_BINARY" /D "00 00 00" /F >NUL 2>&1
Echo [+] Mostrar el puntero del raton al presionar la tecla "control" REG ADD "HKCU\Control Panel\Desktop" /V "UserPreferencesMask" /T "REG_BINARY" /D "9e5e068012000000" /F >NUL 2>&1
Echo [+] Ocultar la Papelera de reciclaje del escritorio REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" /V "{645FF040-5081-101B-9F08-00AA002F954E}" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /V "{645FF040-5081-101B-9F08-00AA002F954E}" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Tamaño de las miniaturas de las vistas previas de la barra de tareas REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "MaxThumbSizePx" /T "REG_DWORD" /D "0x00000190" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "MinThumbSizePx" /T "REG_DWORD" /D "0x000000c8" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "ThumbSpacingXPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "ThumbSpacingYPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "TopMarginPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "BottomMarginPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "LeftMarginPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /V "RightMarginPx" /T "REG_DWORD" /D "0x00000005" /F >NUL 2>&1
Echo [+] Activar Word-Wrap en Notepad REG ADD "HKCU\Software\Microsoft\Notepad" /V "fWrap" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Mostrar confirmacion al enviar archivos a la papelera de reciclaje REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "ConfirmFileDelete" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "ConfirmFileDelete" /F >NUL 2>&1
Echo [+] Ir directamente al escritorio en Windows 8 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage" /V "OpenAtLogon" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Deshabilitar la hibernacion powercfg -h off
Echo [+] Acelerar el apagado de Windows REG ADD "HKCU\Control Panel\desktop" /V "AutoEndTasks" /T "REG_SZ" /D "1" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\desktop" /V "HungAppTimeout" /T "REG_SZ" /D "2000" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\desktop" /V "WaitToKillAppTimeout" /T "REG_SZ" /D "5000" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\desktop" /V "WaitToKillServiceTimeout" /T "REG_SZ" /D "2000" /F >NUL 2>&1 REG ADD "HKCU\Control Panel\desktop" /V "PowerOffActive" /T "REG_SZ" /D "1" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control" /V "WaitToKillServiceTimeout" /T "REG_SZ" /D "2000" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /V "PowerdownAfterShutdown" /T "REG_SZ" /D "1" /F >NUL 2>&1 REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /V "ShutdownWithoutLogon" /T "REG_SZ" /D "1" /F >NUL 2>&1
Echo [+] Aumentar Cache de prelectura REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /V "Max Cached Icons" /T "REG_SZ" /D "4096" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "ReadAheadThresold" /T "REG_BINARY" /D "0000000f" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "NameCache" /T "REG_BINARY" /D "00ff0000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /V "PathCache" /T "REG_BINARY" /D "ff000000" /F >NUL 2>&1
Echo [+] Desactivar envio de informe de errores a Microsoft REG ADD "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /V "Disabled" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar la creacion del log si hay un error en el sistema REG ADD "HKLM\system\ControlSet001\Control\CrashContro" /V "LogEvent" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Desactivar la verificación de drivers no firmados bcdedit.exe -set loadoptions ENABLE_INTEGRITY_CHECKS >NUL 2>&1 bcdedit.exe -set TESTSIGNING OFF >NUL 2>&1
Echo [+] Deshabilitar los contadores de rendimiento REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib" /V "Disable Performance Counters" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Deshabilitar SuperFecth REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnableSuperfetch" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnablePrefetcher" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnableSuperfetch" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnablePrefetcher" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet002\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnableSuperfetch" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1 REG ADD "HKLM\SYSTEM\ControlSet002\Control\Session Manager\Memory Management\PrefetchParameters" /V "EnablePrefetcher" /T "REG_DWORD" /D "0x00000000" /F >NUL 2>&1
Echo [+] Forzar la descarga de las DLL al salir de la aplicacion REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /V "AlwaysUnloadDLL" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar local Distributed File System REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "NoDFSTab”" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Desactivar AutoPlay REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "NoDriveTypeAutoRun”" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1 REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" /V "DisableAutoplay" /T "REG_DWORD" /D "0x00000001" /F >NUL 2>&1
Echo [+] Añadir variable de entorno "Downloads" SETX Downloads "%Userprofile%\Downloads" >NUL 2>&1
Echo [+] Desactivar el contador del tiempo de bloqueo de cuenta de usuario net accounts /lockoutwindow:0 >NUL 2>&1
Echo [+] Desactivar la duración de bloqueo de cuenta de usuario net accounts /lockoutduration:0 >NUL 2>&1
Echo [+] Desactivar el contador de intentos inválidos de acceso de cuenta de usuario net accounts /lockoutthreshold:999 >NUL 2>&1
Echo [+] Modificar el tiempo de espera de la lista de OS del Boot Loader bcdedit /timeout 5 >NUL 2>&1
Echo [+] Desactivar la animación GUI del Boot bcdedit /set {current} quietboot Yes >NUL 2>&1
Echo [+] Añadir opciones para bootear en Modo Seguro
SetLocal EnableDelayedExpansion
::: Customize your safe mode names here: ::: Set "SafeMode_Description=Windows 8 Modo Seguro" Set "SafeModeNetrowk_Description=Windows 8 Modo Seguro con funciones de Red" Set "SafeModeShell_Description=Windows 8 Modo Seguro con Consola" :::
( Bcdedit /Enum /V | FINDSTR /I "^Descrip" | FIND /I "%SafeMode_Description%" 1>NUL ) || ( Bcdedit /Copy {current} /D "%SafeMode_Description%" 1>NUL )
( Bcdedit /Enum /V | FINDSTR /I "^Descrip" | FIND /I "%SafeModeNetrowk_Description%" 1>NUL ) || ( Bcdedit /Copy {current} /D "%SafeModeNetrowk_Description%" 1>NUL )
( Bcdedit /Enum /V | FINDSTR /I "^Descrip" | FIND /I "%SafeModeShell_Description%" 1>NUL ) || ( Bcdedit /Copy {current} /D "%SafeModeShell_Description%" 1>NUL )
For /F "Tokens=2" %%# in ( 'Bcdedit /Enum /V ^| FINDSTR /I "^Identif"' ) do ( SET /A ID_INDEX+=1 Set "ID!ID_INDEX!=%%#" )
For /F "Tokens=1,*" %%A in ( 'Bcdedit /Enum /V ^| FINDSTR /I "^Descrip"' ) do ( SET /A DES_INDEX+=1 Set "DES!DES_INDEX!=%%B" )
For /L %%X in (1, 1, %ID_INDEX%) do (
If /I "!DES%%X!" EQU "%SafeMode_Description%" ( Bcdedit /Set "!ID%%X!" safeboot Minimal 1>NUL Bcdedit /Set "!ID%%X!" quietboot Yes 1>NUL )
If /I "!DES%%X!" EQU "%SafeModeNetrowk_Description%" ( Bcdedit /Set "!ID%%X!" safeboot Network 1>NUL Bcdedit /Set "!ID%%X!" quietboot Yes 1>NUL )
If /I "!DES%%X!" EQU "%SafeModeShell_Description%" ( Bcdedit /Set "!ID%%X!" safeboot Minimal 1>NUL Bcdedit /Set "!ID%%X!" safebootalternateshell Yes 1>NUL Bcdedit /Set "!ID%%X!" quietboot Yes 1>NUL )
)
SetLocal DisableDelayedExpansion
TIMEOUT /T 3 Exit
|
|
|
8095
|
Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE] mrtzcmp3 Downloader
|
en: 26 Octubre 2013, 16:29 pm
|
La solución propuesta es fácilmente mejorable, muestro dos ejemplos. Versión RegEx: #Region " URL Decode " ' [ URL Decode ] ' ' //By Elektro H@cker ' ' Examples : ' MsgBox(URL_Decode("http%3A%2F%2Fwww%2Ewebsite%2Ecom%2Fpage%2Easp%3Fid%3D5%26test%3DHello%5FWorld")) ' Result: http://www.website.com/page.asp?id=5&test=Hello_World Private Function URL_Decode(ByVal url As String) As String Return Regex.Replace( _ url.Replace("+", Chr(Keys.Space)), _ "(%[\dA-F]{2})", Function(hex) Chr(String.Format("&H{0}", hex.Value.Substring(1))), _ RegexOptions.IgnoreCase) End Function #End Region
Versión Select Case: #Region " URL Decode " ' [ URL Decode ] ' ' //By Elektro H@cker ' ' Examples : ' MsgBox(URL_Decode("http%3A%2F%2Fwww%2Ewebsite%2Ecom%2Fpage%2Easp%3Fid%3D5%26test%3DHello%5FWorld")) ' Result: http://www.website.com/page.asp?id=5&test=Hello_World Private Function URL_Decode(ByVal url As String) As String Dim decoded As String = String.Empty For c As Integer = 0 To (url.Length - 1) Select Case url(c) Case "+" decoded &= Convert.ToChar(Keys.Space) Case "%" decoded &= Convert.ToChar(CInt("&H" & url(c + 1) & url(c + 2))) c += 2 Case Else decoded &= url(c) End Select Next c Return decoded End Function #End Region
También se puede mejorar todo lo demás del proyecto en general para desarrollar un downloader asincronico, pero con este código es más que suficiente. Esto lo posteo para todas aquellas personas que se encuentren en la misma situación, sincéramente, no lo posteo para ayudar al autor del post, ni al otro usuario. Un saludo!
|
|
|
8096
|
Foros Generales / Sugerencias y dudas sobre el Foro / Re: Estrasburgo avala que se culpe a un medio 'online' por los comentarios ofensivos
|
en: 26 Octubre 2013, 12:52 pm
|
que los medios 'online' se tengan que responsabilizar de los comentarios ofensivos publicados por sus lectores El mundo se ha vuelto loco, y para colmo lo avala un " tribunal de derechos humanos", que con ese nombre se supone que debería ser un grupo de personas con dos ***** dedos de conocimiento para comprender que una persona no se puede responsabilizar de los actos de otra tercera persona. Es como si un loco ve un coche que no le gusta en un concesionario y decide poner una bomba en el coche, claro, según este " tribunal de derechos humanos", con mucha lógica, la culpa y la condena carcelaria sería para el encargado del concesionario, por poner el coche ahi para que otras personas puedan verlo, olerlo, tocarlo, y opinar sobre él... en fín, mundo de hipocritas y descerebrados. Saludos!
|
|
|
8097
|
Sistemas Operativos / Windows / Re: como editar mi sistema operativo windows !
|
en: 26 Octubre 2013, 09:02 am
|
Mi inquietud era si hay manera de poder cambiar la información del sistema (os) no porque quiero estafar a alguien simplemente por ser un curioso, me gusta ver como funciona el os demi pc explorar curiosear. Editar el valor de unas claves de registro con intención de falsear información de un par de etiquetas OEM del panel de control no te puede ayudar a aprender como funciona un sistema operativo... es una completa estupidez. Si quieres aprender algo útil, entonces coje un manual del Regedit o del funcionamiento de Windows y empieza a leer. Un saludo!
|
|
|
8098
|
Foros Generales / Foro Libre / Re: internet en la luna
|
en: 25 Octubre 2013, 17:28 pm
|
La Luna ya tiene Internet Y a todo esto, ¿para que narices quieren establecer Internet en la Luna?, ¿Quizás para hacer streamings en directo de partidos de fútbol con pelotas de roca Lunar?... Ya me lo veo venir en un futuro no muy lejano (o quizás si, muy lejano)... el Moonball señores! Un saludo!
|
|
|
8099
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 25 Octubre 2013, 17:14 pm
|
Una función genérica para agregar un item a un array de 2 dimensiones #Region " Add Item Array 2D " ' [ Add Item Array 2D ] ' ' // By Elektro H@cker ' ' Examples : ' '// Create an Array 2D (2,2) ' Dim MyArray As String(,) = {{"Item 0,0", "Item 0,1"}, {"Item 1,0", "Item 1,1"}, {"Item 2,0", "Item 2,1"}} '// Add an Item ' Add_Item_Array_2D(MyArray, {"Item 3,0", "Item 3,1"}) Private Sub Add_Item_Array_2D(ByRef Array_2D As String(,), _ ByVal Items As String()) Dim tmp_array(Array_2D.GetUpperBound(0) + 1, Array_2D.GetUpperBound(1)) As String For x As Integer = 0 To Array_2D.GetUpperBound(0) tmp_array(x, 0) = Array_2D(x, 0) tmp_array(x, 1) = Array_2D(x, 1) Next For x As Integer = 0 To Items.Count - 1 tmp_array(tmp_array.GetUpperBound(0), x) = Items(x) Next Array_2D = tmp_array End Sub #End Region
Un ejemplo de como ordenar un documento XML según un elemento dado: #Region " Sort XML By Element " ' [ Sort XML By Element ] ' ' // By Elektro H@cker ' ' Example usage : ' Dim XML As XDocument = Sort_XML_By_Element(XDocument.Load("C:\File.xml"), "Song", "Name") ' Example XML File: ' '<?xml version="1.0" encoding="Windows-1252"?> '<Songs> ' <Song><Name>My Song 2.mp3</Name><Year>2007</Year></Song> ' <Song><Name>My Song 1.mp3</Name><Year>2009</Year></Song> ' <Song><Name>My Song 3.mp3</Name><Year>2008</Year></Song> '</Songs> ' Example output: ' '<?xml version="1.0" encoding="Windows-1252"?> '<Songs> ' <Song><Name>My Song 1.mp3</Name><Year>2009</Year></Song> ' <Song><Name>My Song 2.mp3</Name><Year>2007</Year></Song> ' <Song><Name>My Song 3.mp3</Name><Year>2008</Year></Song> '</Songs> Private Function Sort_XML_By_Element(ByVal XML As XDocument, _ ByVal Root_Element As String, _ ByVal Element_to_sort As String) As XDocument Dim xdoc As XDocument Try xdoc = XML xdoc.Root.ReplaceNodes(XML.Root.Elements(Root_Element) _ .OrderBy(Function(sort) sort.Element(Element_to_sort).Value)) Return xdoc Catch ex As Exception Throw New Exception(ex.Message) Finally xdoc = Nothing End Try End Function #End Region
Un ejemplo de como convertir los elementos de un documento XML a un type anónimo: #Region " Convert XML to Anonymous Type " 'Dim xml As XDocument = XDocument.Load(xmlfile) Dim xml As XDocument = _ <?xml version="1.0" encoding="Windows-1252"?> <!--XML Songs Database.--> <Songs> <Song><Name>My Song 1.mp3</Name><Year>2007</Year><Genre>Dance</Genre><Bitrate>320</Bitrate><Length>04:55</Length><Size>4,80</Size></Song> <Song><Name>My Song 2.mp3</Name><Year>2009</Year><Genre>Electro</Genre><Bitrate>192</Bitrate><Length>06:44</Length><Size>8,43</Size></Song> <Song><Name>My Song 3.mp3</Name><Year>2008</Year><Genre>UK Hardcore</Genre><Bitrate>128</Bitrate><Length>05:12</Length><Size>4,20</Size></Song> </Songs> Dim SongsList = From song In xml.<Songs>.<Song> Select New With { _ song.<Name>.Value, song.<Year>.Value, song.<Genre>.Value, song.<Bitrate>.Value, song.<Length>.Value, song.<Size>.Value _ } For Each song In SongsList MsgBox(String.Format("Name:{1}{0}Year:{2}{0}Genre:{3}{0}Bitrate:{4}{0}Length:{5}{0}Size:{6}", _ Environment.NewLine, _ song.Name, song.Year, song.Genre, song.Bitrate, song.Length, song.Size)) ' Output: ' 'Name:My Song 1.mp3 'Year:2007 'Genre:Dance 'Bitrate:320 'Length:04:55 'Size:4,80 Next #End Region
Un ejemplo de como convertir los elementos de un documento XML a Tuplas #Region " Convert XML to IEnumerable(Of Tuple) " 'Dim xml As XDocument = XDocument.Load(xmlfile) Dim xml As XDocument = _ <?xml version="1.0" encoding="Windows-1252"?> <!--XML Songs Database.--> <Songs> <Song><Name>My Song 1.mp3</Name><Year>2007</Year><Genre>Dance</Genre><Bitrate>320</Bitrate><Length>04:55</Length><Size>4,80</Size></Song> <Song><Name>My Song 2.mp3</Name><Year>2009</Year><Genre>Electro</Genre><Bitrate>192</Bitrate><Length>06:44</Length><Size>8,43</Size></Song> <Song><Name>My Song 3.mp3</Name><Year>2008</Year><Genre>UK Hardcore</Genre><Bitrate>128</Bitrate><Length>05:12</Length><Size>4,20</Size></Song> </Songs> Dim SongsList As IEnumerable(Of Tuple(Of String, String, String, String, String, String)) = _ From song In xml.<Songs>.<Song> Select Tuple.Create( _ song.<Name>.Value, song.<Year>.Value, song.<Genre>.Value, song.<Bitrate>.Value, song.<Length>.Value, song.<Size>.Value _ ) For Each song In SongsList MsgBox(String.Format("Name:{1}{0}Year:{2}{0}Genre:{3}{0}Bitrate:{4}{0}Length:{5}{0}Size:{6}", _ Environment.NewLine, _ song.Item1, song.Item2, song.Item3, song.Item4, song.Item5, song.Item6)) ' Output: ' 'Name:My Song 1.mp3 'Year:2007 'Genre:Dance 'Bitrate:320 'Length:04:55 'Size:4,80 Next #End Region
Un ejemplo de como usar Arrays 2D ' Create Array 2D (2,2) Dim MyArray As String(,) = {{"Item 0,0", "Item 0,1"}, {"Item 1,0", "Item 1,1"}, {"Item 2,0", "Item 2,1"}} ' Set value MyArray(0, 1) = "New Item 0,1" ' Get Value MsgBox(MyArray(0, 1)) ' Loop over the Array 2D For x As Integer = 0 To MyArray.GetUpperBound(0) MsgBox(String.Format("Array 2D {1},0: {2}{0}Array 2D {1},1: {3}", Environment.NewLine, _ x, MyArray(x, 0), MyArray(x, 1))) Next
Un ejemplo de como crear un Type propio: Public Class Type1 Private _Name As String Private _Age As Short Public Property Name() As String Get Return _Name End Get Set(ByVal value As String) _Name = value End Set End Property Public Property Age() As Short Get Return _Age End Get Set(ByVal value As Short) _Age = value End Set End Property End Class 'Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' ' ' Create a list of our own Type and add Elements: ' Dim Contacts As New List(Of Type1) From { _ ' New Type1 With {.Name = "Lucia", .Age = 19}, _ ' New Type1 With {.Name = "Pepe", .Age = 40} _ ' } ' ' ' Add another Element ' Contacts.Add(New Type1 With {.Name = "Pablo", .Age = 32}) ' ' ' Find an Element: ' Dim Contact As Type1 = Contacts.Find(Function(x) x.Name = "Lucia") ' ' ' Display Element members: ' MsgBox(String.Format("Name: {1}{0}Age: {2}", _ ' Environment.NewLine, _ ' Contact.Name, Contact.Age)) ' ' ' Loop over all Elements: ' For Each Element As Type1 In Contacts ' MsgBox(String.Format("Name: {1}{0}Age: {2}", _ ' Environment.NewLine, _ ' Element.Name, Element.Age)) ' Next ' 'End Sub
Una función genérica para obtener el serial de la CPU (Este snippet fue de los primeros que posteé, le he dado un repaso al código) #Region " Get CPU ID " ' [ Get CPU ID ] ' '// By Elektro H@cker ' ' INSTRUCTIONS: ' 1. Add a reference to "System.Management" ' ' Examples : ' Dim ProcID As String = Get_CPU_ID() ' MsgBox(Get_CPU_ID()) Private Function Get_CPU_ID() As String Dim wmi As Management.ManagementObjectSearcher = _ New Management.ManagementObjectSearcher("select * from Win32_Processor") Dim val As String = wmi.Get(0)("ProcessorID") wmi.Dispose() Return val.ToString End Function #End Region
Una función genérica para obtener el serial de la placa base (Este snippet fue de los primeros que posteé, le he dado un repaso al código) #Region " Get Motherboard ID " ' [ Get Motherboard ID ] ' '// By Elektro H@cker ' ' INSTRUCTIONS: ' 1. Add a reference to "System.Management" ' ' Examples : ' Dim MotherID As String = Get_Motherboard_ID() ' MsgBox(Get_Motherboard_ID()) Private Function Get_Motherboard_ID() As String Dim wmi As Management.ManagementObjectSearcher = _ New Management.ManagementObjectSearcher("select * from Win32_BaseBoard") Dim val As String = wmi.Get(0)("SerialNumber") wmi.Dispose() Return val End Function #End Region
Y por último, unos ejemplos muy sencillos de como manejar un documento XML (sencillo)... (Uso un XMLTextWritter en lugar de un XMLWriter por la libertad de indentación) ' [ Song XML Writer Helper ] ' ' // By Elektro H@cker ' ' Example usage : ' 'Private Sub Test() ' ' ' Set an XML file to create ' Dim xmlfile As String = "C:\My XML File.xml" ' ' ' Create the XmlWriter object ' Dim XmlWriter As Xml.XmlTextWriter = _ ' New Xml.XmlTextWriter(xmlfile, System.Text.Encoding.Default) _ ' With {.Formatting = Xml.Formatting.Indented} ' ' ' Write the Xml declaration. ' XMLHelper.Write_Beginning(XmlWriter) ' ' Output at this point: ' ' <?xml version="1.0" encoding="Windows-1252"?> ' ' ' Write a comment. ' XMLHelper.Write_Comment(XmlWriter, "XML Songs Database", Xml.Formatting.Indented) ' ' Output at this point: ' ' <!--XML Songs Database--> ' ' ' Write the root element. ' XMLHelper.Write_Beginning_Root_Element(XmlWriter, "Songs", Xml.Formatting.Indented) ' ' Output at this point: ' ' <Songs> ' ' ' Write the start of a song element. ' XMLHelper.Write_Beginning_Root_Element(XmlWriter, "Song", Xml.Formatting.Indented) ' ' Output at this point: ' ' <Song> ' ' ' Write a song element. ' XMLHelper.Write_Elements(XmlWriter, { _ ' {"Name", "My Song file.mp3"}, _ ' {"Year", "2013"}, _ ' {"Genre", "Rock"} _ ' }, Xml.Formatting.None) ' ' Output at this point: ' ' <Name>My Song file.mp3</Name><Year>2007</Year><Genre>Dance</Genre> ' ' ' Write the end of a song element. ' XMLHelper.Write_End_Root_Element(XmlWriter, Xml.Formatting.None) ' ' Output at this point: ' ' </Song> ' ' ' Write the end of the Root element. ' XMLHelper.Write_End_Root_Element(XmlWriter, Xml.Formatting.Indented) ' ' Output at this point: ' ' </Songs> ' ' ' Write the xml end of file. ' XMLHelper.Write_End(XmlWriter) ' ' ' Start the file and exit ' Process.Start(xmlfile) : Application.Exit() ' ' ' Final output: ' ' ' '<?xml version="1.0" encoding="Windows-1252"?> ' '<!--XML Songs Database--> ' '<Songs> ' ' <Song><Name>My Song file.mp3</Name><Year>2007</Year><Genre>Dance</Genre></Song> ' '</Songs> ' 'End Sub #Region " XML Helper " Class XMLHelper ''' <summary> ''' Writes the Xml beginning declaration. ''' </summary> Shared Sub Write_Beginning(ByVal XmlWriter As Xml.XmlTextWriter) Try XmlWriter.WriteStartDocument() Catch ex As InvalidOperationException Dim errormsg As String = "This is not the first write method called after the constructor. " Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes a comment. ''' </summary> Shared Sub Write_Comment(ByVal XmlWriter As Xml.XmlTextWriter, _ ByVal Comment As String, _ Optional ByVal Indentation As Xml.Formatting = Xml.Formatting.Indented) Try XmlWriter.Formatting = Indentation XmlWriter.WriteComment(Comment) XmlWriter.Formatting = Not Indentation Catch ex As ArgumentException Dim errormsg As String = "The text would result in a non-well formed XML document" Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As InvalidOperationException Dim errormsg As String = "The ""WriteState"" property is Closed" Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes the beginning of a root element. ''' </summary> Shared Sub Write_Beginning_Root_Element(ByVal XmlWriter As Xml.XmlTextWriter, _ ByVal Element As String, _ Optional ByVal Indentation As Xml.Formatting = Xml.Formatting.Indented) Try XmlWriter.Formatting = Indentation XmlWriter.WriteStartElement(Element) XmlWriter.Formatting = Not Indentation Catch ex As System.Text.EncoderFallbackException Dim errormsg As String = "There is a character in the buffer that is a valid XML character but is not valid for the output encoding." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As InvalidOperationException Dim errormsg As String = "The XmlTextWriter is closed or An XmlTextWriter method was called before a previous asynchronous operation finished." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes the end of a root element. ''' </summary> Shared Sub Write_End_Root_Element(ByVal XmlWriter As Xml.XmlTextWriter, _ Optional ByVal Indentation As Xml.Formatting = Xml.Formatting.Indented) Try XmlWriter.Formatting = Indentation XmlWriter.WriteEndElement() XmlWriter.Formatting = Not Indentation Catch ex As System.Text.EncoderFallbackException Dim errormsg As String = "There is a character in the buffer that is a valid XML character but is not valid for the output encoding." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As InvalidOperationException Dim errormsg As String = "The XmlTextWriter is closed or An XmlTextWriter method was called before a previous asynchronous operation finished." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes an element. ''' </summary> Shared Sub Write_Element(ByVal XmlWriter As Xml.XmlTextWriter, _ ByVal StartElement As String, _ ByVal Element As String, _ Optional ByVal Indentation As Xml.Formatting = Xml.Formatting.Indented) Try XmlWriter.Formatting = Indentation XmlWriter.WriteStartElement(StartElement) XmlWriter.WriteString(Element) XmlWriter.WriteEndElement() XmlWriter.Formatting = Not Indentation Catch ex As System.Text.EncoderFallbackException Dim errormsg As String = "There is a character in the buffer that is a valid XML character but is not valid for the output encoding." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As InvalidOperationException Dim errormsg As String = "The XmlTextWriter is closed or An XmlTextWriter method was called before a previous asynchronous operation finished." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes multiple elements. ''' </summary> Shared Sub Write_Elements(ByVal XmlWriter As Xml.XmlTextWriter, _ ByVal Elements As String(,), _ Optional ByVal Indentation As Xml.Formatting = Xml.Formatting.Indented) Try XmlWriter.Formatting = Indentation For x As Integer = 0 To Elements.GetUpperBound(0) XmlWriter.WriteStartElement(Elements(x, 0)) XmlWriter.WriteString(Elements(x, 1)) XmlWriter.WriteEndElement() Next XmlWriter.Formatting = Not Indentation Catch ex As System.Text.EncoderFallbackException Dim errormsg As String = "There is a character in the buffer that is a valid XML character but is not valid for the output encoding." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As InvalidOperationException Dim errormsg As String = "The XmlTextWriter is closed or An XmlTextWriter method was called before a previous asynchronous operation finished." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub ''' <summary> ''' Writes the xml end of file. ''' </summary> Shared Sub Write_End(ByVal XmlWriter As Xml.XmlTextWriter) Try XmlWriter.WriteEndDocument() XmlWriter.Close() Catch ex As ArgumentException Dim errormsg As String = "The XML document is invalid." Throw New Exception(errormsg & Environment.NewLine & ex.StackTrace) ' MessageBox.Show(errormsg) Catch ex As Exception Throw New Exception(ex.Message & Environment.NewLine & ex.StackTrace) End Try End Sub End Class #End Region
|
|
|
8100
|
Foros Generales / Foro Libre / Re: ¿Donde encontrar Tests de conducir online?, pero con...
|
en: 25 Octubre 2013, 11:54 am
|
Gracias chavales
@Shout Joder, que bueno el PDF, no se como has encontrado algo así xD, con eso ya lo tengo todo resuelto, mil gracias!
@@synthesize Perdona si te ofendí ayer, pero lo que te dije es un poco cierto... y bueno, se trata de mi madre a la que el gobierno está puteando, así que eso hace que yo esté aún mas susceptible con comentarios negativos.
Un saludo!
|
|
|
|
|
|
|