Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúFile Name: es_windows_8_1_x64_dvd_2707379.iso
Languages: Spanish
SHA1: 08C6B43ED6C96E7F98DAED9D13308E536B6D1481
' *********************
' FirewallRuleCheck.vbs
' *********************
' By Elektro
' ------------
' Description:
' ------------
'
' This script determines whether a program has the Inbound or Outbound connections blocked by the Windows Firewall rules.
'
' NOTE: Possibly this script will not work under Windows XP where;
' the Netsh syntax is different and maybe the Firewall registry values could be diferent too, I've don't tested it.
' Tested on Windows 8.
' -------
' Syntax:
' -------
'
' FirewallRuleCheck.vbs "[File]" "[ConnectionType]" "[ReturnResult]"
' -----------
' Parameters:
' -----------
'
' [File]
' This parameter indicates the file to check their connection status.
' The value should be the relative or absolute filepath of an existing file.
'
' [ConnectionType]
' This parameter indicates whether to check inbound or outbound connection status.
' The value should be "In" or "Out".
'
' [ReturnResult]
' This parameter indicates whether the result should be returned without displaying any info;
' for example, when calling this script from other script to expect a Boolean result.
' The value is Optional, and should be "True" or "False". Default value is "False".
' ---------------
' Usage examples:
' ---------------
'
' FirewallRuleCheck.vbs "C:\Program.exe" IN
' FirewallRuleCheck.vbs "C:\Program.exe" OUT
' BooleanExitCode = FirewallRuleCheck.vbs "C:\Program.exe" IN True
' BooleanExitCode = FirewallRuleCheck.vbs "C:\Program.exe" OUT True
' -----------
' Exit codes:
' -----------
'
' When 'ReturnResult' parameter is set to 'False':
' 0: Successful exit.
' 1: Missing arguments or too many arguments.
' 2: File not found.
' 3: Wrong value specified for parameter '[ConnectionType]'
' 4: Wrong value specified for parameter '[ReturnResult]'
' 5: Specific Error.
'
' When 'ReturnResult' parameter is set to 'True':
' -1: 'True' (Rule is not added).
' 0: 'False' (Rule is already added).
' (All the other ExitCodes: '1', '2', '3', '4' and '5' can happen in this mode, except '0')
' *************
Option Explicit
Const MsgBoxSyntax = "FirewallRuleCheck.vbs ""[File]"" ""[ConnectionType]"" ""[ReturnResult]"""
Const MsgBoxCaption = "Firewall Rule Check"
Const MsgBoxErrorIco = 16
Const MsgBoxInfoIco = 64
Const MsgBoxDebugIco = 48
Dim objFile ' Indicates the file object.
Dim objReg ' Indicates the registry object.
Dim Root ' Indicates the root registry key.
Dim Key ' Indicates the registry key.
Dim MatchData ' Indicates the data to match.
Dim Values ' Indicates the registry value collection.
Dim Value ' Indicates the registry value.
Dim Data ' Indicates the registry data.
Dim DataIsMatched ' Indicates whether the data is matched.
Dim ConnectionType ' Indicates whether to check inbound or outbound connection status.
Dim ReturnResult ' Indicates whether the result should be returned without displaying any info;
' for example, when calling this script from other script to expect a Boolean result.
Dim DebugMode ' Indicates whether the debug mode is activated.
' Set the debug mode to 'True' if need to test the values.
DebugMode = False
' Set the 'HKEY_LOCAL_MACHINE' as Root registry key.
Root = &H80000002
' Set the Firewall rules registry location as key.
Key = "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules"
' Sets the Registry object.
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
' Argument error handling.
If Wscript.Arguments.Count = 0 Then
' Notify the error to the user.
MsgBox "Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count < 2 Then
' Notify the error to the user.
MsgBox "Missing arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count = 3 Then
If LCase(Wscript.Arguments(2)) = LCase("True") Then
ReturnResult = True
Elseif LCase(Wscript.Arguments(2)) = LCase("False") Then
ReturnResult = False
Else
' Notify the error to the user.
MsgBox "Wrong value specified for parameter 'Return Result'", _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Wrong value specified for parameter '[Return Result]''.
Wscript.Quit(4)
End If
ElseIf Wscript.Arguments.Count > 3 Then
' Notify the error to the user.
MsgBox "Too many arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Too many arguments'.
Wscript.Quit(1)
End If
On Error Resume Next
' Set the FileObject with the file passed through the first argument.
Set objFile = Createobject("Scripting.FileSystemObject"). _
GetFile(Wscript.Arguments(0))
' File-Error handling.
If Err.Number = 53 Then
' Notify the error to the user.
MsgBox "File not found:" & _
vbnewline & _
Wscript.Arguments(0), _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'File not found'.
Wscript.Quit(2)
End If
' Set the partial data to match on each value-data.
If LCase(Wscript.Arguments(1)) = LCase("IN") Then
' Set the ConnectionType to 'Inbound'
ConnectionType = "Inbound"
Elseif LCase(Wscript.Arguments(1)) = LCase("OUT") Then
' Set the ConnectionType to 'Outbound'
ConnectionType = "Outbound"
Else ' Wrong argument.
' Notify the error to the user.
MsgBox "Wrong value specified for parameter '[ConnectionType]'", _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Wrong value specified for parameter '[ConnectionType]''.
Wscript.Quit(3)
End If
' Set the data to match (It's a portion of the firewall rule).
MatchData = "Action=Block|Active=TRUE|Dir=" & Wscript.Arguments(1) & "|App=" & objFile.Path
' Enumerate the registry values.
objReg.EnumValues Root, Key, Values
If DebugMode Then
' Notify the debug information.
MsgBox "File: " & objFile.Path & vbnewline & vbnewline & _
"ConnectionType: " & ConnectionType & vbnewline & vbnewline & _
"Key: " & Key & vbnewline & vbnewline & _
"Value count: " & UBound(Values) & vbnewline & vbnewline & _
"MatchData: " & MatchData & vbnewline , _
MsgBoxDebugIco, "Debug Info | " & MsgBoxCaption
End If
' Loop through the enumerated registry values.
For Each Value In Values
' Get the registry data.
objReg.GetStringValue Root, Key, Value, Data
' If registry data is not empty then...
If Not IsNull(Data) Then
' Match the partial data onto the registry data.
' If partial data matched in into the data then...
If InStr(1, Data, MatchData, 1) Then
' Set the DataIsMatched flag to 'True'.
DataIsMatched = True
' ...and stop the iteration.
Exit For
End If ' // InStr()
End If ' // IsNull()
Next ' // Value
' Error handling.
If Err.Number <> 0 Then
' Notify the error to the user.
MsgBox "Error Code: " & Err.Number & vbnewline & _
"Error Source: " & Err.Source & vbnewline & _
"Description: " & Err.Description , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Specific error'.
Wscript.Quit(5)
End If
If ReturnResult Then
If DataIsMatched = True Then
' Exit with boolean result 'True' (Rule already exist).
Wscript.Quit(-1)
Else
' Exit with boolean result 'False' (Rule doesn't exist).
Wscript.Quit(0)
End If
End If
' This (ridiculous) conversion is needed;
' because the VBS engine prints the boolean value into a MsgBox;
' according to the OS language ( Spanish: Verdadero|Falso )
If DataIsMatched = True Then
DataIsMatched = "True"
Else
DataIsMatched = "False"
End If
' Notify the information to the user.
MsgBox "File: " & objFile.Name & vbnewline & _
"Connection: " & ConnectionType & vbnewline & _
"Blocked?: " & DataIsMatched , _
MsgBoxInfoIco, MsgBoxCaption
' Exit successfully.
Wscript.Quit(0)
Wscript.exe ThisScript.vbs "C:\Program.exe" IN
Wscript.exe ThisScript.vbs "C:\Program.exe" OUT
' *******************
' FirewallRuleAdd.vbs
' *******************
' By Elektro
' ------------
' Description:
' ------------
'
' This Script adds a Firewall rule to block the Inbound or Outbound connections of a file.
'
' NOTE: Possibly this script will not work under Windows XP where;
' the Netsh syntax is different and maybe the Firewall registry values could be diferent too, I've don't tested it.
' Tested on Windows 8.
' -------
' Syntax:
' -------
'
' FirewallRuleAdd.vbs "[File]" "[ConnectionType]"
' -----------
' Parameters:
' -----------
'
' [File]
' This parameter indicates the file to block.
' The value should be the relative or absolute filepath of an existing file.
'
' [ConnectionType]
' This parameter indicates whether to add a rule to block inbound or outbound connections.
' The value should be "In" or "Out".
' ---------------
' Usage examples:
' ---------------
'
' FirewallRuleAdd.vbs "C:\Program.exe" IN
' FirewallRuleAdd.vbs "C:\Program.exe" OUT
' -----------
' Exit codes:
' -----------
'
' -1: Rule already exist.
' 0: Successful exit.
' 1: Missing arguments or too many arguments.
' 2: File not found.
' 3: Wrong value specified for parameter '[ConnectionType]'
' 4: Specific Error.
' *************
Option Explicit
Const MsgBoxSyntax = "FirewallRuleAdd.vbs ""[File]"" ""[ConnectionType]"""
Const MsgBoxCaption = "Firewall Rule Add"
Const MsgBoxErrorIco = 16
Const MsgBoxInfoIco = 64
Const MsgBoxDebugIco = 48
Dim objFile ' Indicates the File Object.
Dim Process ' Indicates the process to run.
Dim Arguments ' Indicates the process arguments.
Dim Result ' Indicates the result (Exit Code) of the process.
Dim ConnectionType ' Indicates whether to block inbound or outbound connections.
Dim DebugMode ' Indicates whether the debug mode is activated.
' Set the debug mode to 'True' if need to test the values.
DebugMode = False
' Argument error handling.
If Wscript.Arguments.Count = 0 Then
' Notify the error to the user.
MsgBox "Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments' error-code.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count < 2 Then
' Notify the error to the user.
MsgBox "Missing arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count > 2 Then
' Notify the error to the user.
MsgBox "Too many arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Too many arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count = 2 Then
If LCase(Wscript.Arguments(1)) = LCase("IN") Then
' Set the ConnectionType to 'Inbound'
ConnectionType = "Inbound"
Elseif LCase(Wscript.Arguments(1)) = LCase("OUT") Then
' Set the ConnectionType to 'Outbound'
ConnectionType = "Outbound"
Else ' Wrong argument.
' Notify the error to the user.
MsgBox "Wrong value specified for parameter '[ConnectionType]'", _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Wrong value specified for parameter '[ConnectionType]''.
Wscript.Quit(3)
End If
End If
On Error Resume Next
' Set the FileObject with the file passed through the first argument.
Set objFile = Createobject("Scripting.FileSystemObject"). _
GetFile(Wscript.Arguments(0))
' File-Error handling.
If Err.Number = 53 Then
' Notify the error to the user.
MsgBox "File not found:" & _
vbnewline & _
Wscript.Arguments(0), _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'File not found'.
Wscript.Quit(2)
End If
' Set the firewall process.
Process = "netsh.exe"
' Set the firewall rule parameters to add Inbound or Outbound blocking rule.
Arguments = "AdvFirewall Firewall Add Rule" & _
" Name=" & """" & objFile.Name & """" & _
" Dir=" & Wscript.Arguments(1) & _
" Action=Block" & _
" Program=" & """" & objFile.Path & """"
' Call the 'FirewallRuleCheck' script to retrieve their exit code;
' This way I determine whether the bloking rule already exist or not.
Result = WScript.CreateObject("WScript.Shell"). _
Run("FirewallRuleCheck.vbs" & " " & _
"""" & objFile.Path & """" & " " & _
Wscript.Arguments(1) & " " & _
"True", 0, True)
If DebugMode Then
' Notify the debug information.
MsgBox "File: " & objFile.Path & vbnewline & vbnewline & _
"ConnectionType: " & ConnectionType & vbnewline & vbnewline & _
"Process: " & Process & vbnewline & vbnewline & _
"Arguments: " & Arguments & vbnewline & vbnewline & _
"Reult: " & Result & vbnewline , _
MsgBoxDebugIco, "Debug Info | " & MsgBoxCaption
End If
' Error handling.
If Err.Number <> 0 Then
' Notify the error to the user.
MsgBox "Error Code: " & Err.Number & vbnewline & _
"Error Source: " & Err.Source & vbnewline & _
"Description: " & Err.Description , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Specific error'.
Wscript.Quit(5)
End If
If Result = -1 Then ' Rule already exist.
' Notify the error to the user.
MsgBox ConnectionType & " connection blocking rule already exist for file:" & _
vbnewline & _
objFile.Name , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Rule already exist'.
Wscript.Quit(-1)
Else ' Rule added successfully.
WScript.CreateObject("WScript.Shell").Run Process & " " & Arguments, 0, True
' Notify the information to the user.
MsgBox ConnectionType & " connection blocking rule successfully added for file:" & _
vbnewline & _
objFile.Name , _
MsgBoxInfoIco, MsgBoxCaption
End If
' Exit successfully.
Wscript.Quit(0)
' *******************
' FirewallRuleDel.vbs
' *******************
' By Elektro
' ------------
' Description:
' ------------
'
' This Script deletes an existing firewall rule that is blocking the Inbound or Outbound connections of a file.
'
' NOTE: Possibly this script will not work under Windows XP where;
' the Netsh syntax is different and maybe the Firewall registry values could be diferent too, I've doesn't tested it.
' Tested on Windows 8.
' -------
' Syntax:
' -------
'
' FirewallRuleDel.vbs "[File]" "[ConnectionType]"
' -----------
' Parameters:
' -----------
'
' [File]
' This parameter indicates the file to block.
' The value should be the relative or absolute filepath of an existing file.
'
' [ConnectionType]
' This parameter indicates whether to delete the rule that is blocking inbound or outbound connections.
' The value should be "In" or "Out".
' ---------------
' Usage examples:
' ---------------
'
' FirewallRuleDel.vbs "C:\Program.exe" IN
' FirewallRuleDel.vbs "C:\Program.exe" OUT
' -----------
' Exit codes:
' -----------
'
' -1: Rule doesn't exist.
' 0: Successful exit.
' 1: Missing arguments or too many arguments.
' 2: File not found.
' 3: Wrong value specified for parameter '[ConnectionType]'
' 4: Specific Error.
' *************
Option Explicit
Const MsgBoxSyntax = "FirewallRuleDel.vbs ""[File]"" ""[ConnectionType]"""
Const MsgBoxCaption = "Firewall Rule Del"
Const MsgBoxErrorIco = 16
Const MsgBoxInfoIco = 64
Const MsgBoxDebugIco = 48
Dim objFile ' Indicates the File Object.
Dim Process ' Indicates the process to run.
Dim Arguments ' Indicates the process arguments.
Dim Result ' Indicates the result (Exit Code) of the process.
Dim ConnectionType ' Indicates whether to unblock inbound or outbound connections.
Dim DebugMode ' Indicates whether the debug mode is activated.
' Set the debug mode to 'True' if need to test the values.
DebugMode = False
' Argument error handling.
If Wscript.Arguments.Count = 0 Then
' Notify the error to the user.
MsgBox "Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments' error-code.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count < 2 Then
' Notify the error to the user.
MsgBox "Missing arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Missing arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count > 2 Then
' Notify the error to the user.
MsgBox "Too many arguments." & _
VBNewLine & VBNewLine & _
"Syntax:" & VBNewLine & _
MsgBoxSyntax , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Too many arguments'.
Wscript.Quit(1)
ElseIf Wscript.Arguments.Count = 2 Then
If LCase(Wscript.Arguments(1)) = LCase("IN") Then
' Set the ConnectionType to 'Inbound'
ConnectionType = "Inbound"
Elseif LCase(Wscript.Arguments(1)) = LCase("OUT") Then
' Set the ConnectionType to 'Outbound'
ConnectionType = "Outbound"
Else ' Wrong argument.
' Notify the error to the user.
MsgBox "Wrong value specified for parameter '[ConnectionType]'", _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Wrong value specified for parameter '[ConnectionType]''.
Wscript.Quit(3)
End If
End If
On Error Resume Next
' Set the FileObject with the file passed through the first argument.
Set objFile = Createobject("Scripting.FileSystemObject"). _
GetFile(Wscript.Arguments(0))
' File-Error handling.
If Err.Number = 53 Then
' Notify the error to the user.
MsgBox "File not found:" & _
vbnewline & _
Wscript.Arguments(0), _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'File not found'.
Wscript.Quit(2)
End If
' Set the firewall process.
Process = "netsh.exe"
' Set the firewall rule parameters to delete Inbound or Outbound blocking rule.
Arguments = "AdvFirewall Firewall Delete Rule" & _
" Name=" & """" & objFile.Name & """" & _
" Dir=" & Wscript.Arguments(1)
' Call the 'FirewallRuleCheck' script to retrieve their exit code;
' This way I determine whether the bloking rule is exist or not.
Result = WScript.CreateObject("WScript.Shell"). _
Run("FirewallRuleCheck.vbs" & " " & _
"""" & objFile.Path & """" & " " & _
Wscript.Arguments(1) & " " & _
"True", 0, True)
If DebugMode Then
' Notify the debug information.
MsgBox "File: " & objFile.Path & vbnewline & vbnewline & _
"ConnectionType: " & ConnectionType & vbnewline & vbnewline & _
"Process: " & Process & vbnewline & vbnewline & _
"Arguments: " & Arguments & vbnewline & vbnewline & _
"Reult: " & Result & vbnewline , _
MsgBoxDebugIco, "Debug Info | " & MsgBoxCaption
End If
' Error handling.
If Err.Number <> 0 Then
' Notify the error to the user.
MsgBox "Error Code: " & Err.Number & vbnewline & _
"Error Source: " & Err.Source & vbnewline & _
"Description: " & Err.Description , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Specific error'.
Wscript.Quit(5)
End If
If Result = 0 Then ' Rule doesn't exist.
' Notify the error to the user.
MsgBox ConnectionType & " connection blocking rule doesn't exist for file:" & _
vbnewline & _
objFile.Name , _
MsgBoxErrorIco, MsgBoxCaption
' Exit with reason: 'Rule doesn't exist'.
Wscript.Quit(-1)
Else ' Rule deleted successfully.
WScript.CreateObject("WScript.Shell").Run Process & " " & Arguments, 0, True
' Notify the information to the user.
MsgBox ConnectionType & " connection block rule successfully deleted for file:" & _
vbnewline & _
objFile.Name , _
MsgBoxInfoIco, MsgBoxCaption
End If
' Exit successfully.
Wscript.Quit(0)
#Region " Imports "
Imports System.IO
Imports System.Runtime.InteropServices
Imports RefreshExplorer.NativeMethods
#End Region
''' <summary>
''' Initializes a new instance of Explorer process.
''' </summary>
Module RefreshExplorer
#Region " P/Invoke "
''' <summary>
''' Class NativeMethods.
''' </summary>
Friend Class NativeMethods
''' <summary>
''' Retrieves a handle to the top-level window whose class name and window name match the specified strings.
''' This function does not search child windows.
''' This function does not perform a case-sensitive search.
''' </summary>
''' <param name="lpClassName">
''' The class name or a class atom created by a previous call to the
''' RegisterClass or RegisterClassEx function.
''' The atom must be in the low-order word of lpClassName;
''' the high-order word must be zero.
''' If lpClassName points to a string, it specifies the window class name.
''' The class name can be any name registered with RegisterClass or RegisterClassEx,
''' or any of the predefined control-class names.
''' If lpClassName is NULL, it finds any window whose title matches the lpWindowName parameter.
''' </param>
''' <param name="zero">
''' The window name (the window's title).
''' If this parameter is NULL, all window names match.</param>
''' <returns>IntPtr.</returns>
<DllImport("user32.dll", EntryPoint:="FindWindow", SetLastError:=True, CharSet:=CharSet.Unicode)>
Public Shared Function FindWindowByClass(
ByVal lpClassName As String,
ByVal zero As IntPtr
) As IntPtr
End Function
End Class
#End Region
#Region " ReadOnly Strings "
''' <summary>
''' Indicates the directory where the Explorer process is located.
''' </summary>
Private ReadOnly ExplorerDirectory As String =
Environment.GetFolderPath(Environment.SpecialFolder.Windows)
''' <summary>
''' Indicates the filename of the process.
''' </summary>
Private ReadOnly ExplorerFilename As String = "Explorer.exe"
''' <summary>
''' Indicates the desk Taskbar Class-name.
''' </summary>
Private ReadOnly TaskBarClassName As String = "Shell_TrayWnd"
#End Region
#Region " Process "
''' <summary>
''' The explorer process.
''' </summary>
Dim Explorer As New Process With
{
.StartInfo = New ProcessStartInfo With
{
.FileName = Path.Combine(ExplorerDirectory, ExplorerFilename),
.WorkingDirectory = My.Application.Info.DirectoryPath,
.UseShellExecute = True
}
}
#End Region
#Region " Main "
''' <summary>
''' Defines the entry point of the application.
''' </summary>
Sub Main()
Select Case Convert.ToBoolean(CInt(FindWindowByClass(TaskBarClassName, Nothing)))
Case False ' The Taskbar is not found.
Try
Explorer.Start()
Console.WriteLine("Windows Explorer has been re-initialized successfully")
Environment.Exit(0)
Catch ex As Exception
Console.WriteLine(ex.Message)
Debug.WriteLine(ex.Message)
Environment.Exit(1)
End Try
Case True ' The Taskbar is found.
Console.WriteLine("Can't proceed, Windows Explorer is currently running. Exiting...")
Environment.Exit(2)
End Select
End Sub
#End Region
End Module
</style>
</head>
<body>
<div id="container">
<div id="wb_Shape1" style="position:absolute;left:519px;top:403px;width:281px;height:415px;text-align:left;z-index:4;">
<img src="images/img0001.png" id="Shape1" alt="" title="" style="border-width:0;width:281px;height:415px"></div>
<div id="wb_Shape2" style="position:absolute;left:535px;top:418px;width:249px;height:35px;text-align:left;z-index:5;">
<img src="images/img0002.png" id="Shape2" alt="" title="" style="border-width:0;width:249px;height:35px"></div>
<div id="wb_Image2" style="position:absolute;left:0px;top:129px;width:800px;height:264px;text-align:left;z-index:6;">
<img src="images/wwb_londonskyline.jpg" id="Image2" alt="" style="width:798px;height:262px;"></div>
<div id="wb_Shape4" style="position:absolute;left:0px;top:403px;width:519px;height:173px;text-align:left;z-index:7;">
<img src="images/img0003.png" id="Shape4" alt="" title="" style="border-width:0;width:519px;height:173px"></div>
<div id="wb_Text5" style="position:absolute;left:21px;top:425px;width:465px;height:92px;text-align:left;z-index:8;border:0px #C0C0C0 solid;overflow-y:hidden;background-color:transparent;">
<div style="font-family:Arial;font-size:13px;color:#000000;">
<div style="text-align:left"><span style="font-family:'Trebuchet MS';font-size:15px;color:#6CBE00;"><strong>Welcome to our website</strong></span></div>
<div style="text-align:left"><span style="font-family:'Trebuchet MS';font-size:12px;color:#CED1D6;">Lorem ipsum dolor sit amet, autem consectetuer adipiscing elit, sed diam </span></div>
<div style="text-align:left"><span style="font-family:'Trebuchet MS';font-size:12px;color:#CED1D6;">nonummy nibh euismod iusto tincidunt ut laoreet dolore magna aliquam erat </span></div>
<div style="text-align:left"><span style="font-family:'Trebuchet MS';font-size:12px;color:#CED1D6;">volutpat. Ut wisi enim ad minim veniam, quis nostrud facer exerci tation </span></div>
<div style="text-align:left"><span style="font-family:'Trebuchet MS';font-size:12px;color:#CED1D6;">ullamcorper suscipit lobortis nisl ut aliquip ex ea delenit commodo consequat.</span></div>
</div>
</div>
<body>
<div id="container">
<div id="wb_Shape1"
style="position:absolute;left:519px;top:403px;width:281px;height:415px;text-align:left;z-index:4;">
<img src="images/img0001.png"
id="Shape1"
alt=""
title=""
style="border-width:0;width:281px;height:4150px">
</div>
<div style="text-align:left">
<span style="font-family:'Trebuchet MS';font-size:11px;color:#7B7E83;">
erat volutpat.
</span>
</div>
</body>
Color.Net es una sencilla herramienta para para obtener la información del color del pixel actual sobre en pantalla. Color.Net está enfocado para programadores, pudiendo representar los valores ARGB en distintos lenguajes y formatos con un solo click !!. Características
Imágenes ![]() ![]() ![]() DESCARGA (v2.2) SI TE HA GUSTADO MI APORTE, ¡COMENTA! ![]() |
Cita de: http://forums.reflector.net/questions/1918/how-to-modify-code-in-net-dll-and-save-these-chang.html use Reflexil with the "Replace all with code" feature. Paste the code and fix imports. Should be ok.
' Name.......: Help Section
' Author.....: Elektro
' Description: Class that manages the Help documentation of a Console application with colorization capabilities.
' Last Update: 05/01/2014
' References.: LINQ, 'WriteColoredText' method by Elektro.
' Indications: Use *F##* as the ForeColor beginning delimiter, use *-F* to restore the console forecolor.
' Use *B##* as the BackColor beginning delimiter, use *-B* to restore the console BackColor.
#Region " Usage Examples "
#Region " Example Without Colorization "
'Module Module1
' Sub Main()
' Console.Title = HelpSection.Help.<Title>.Value
' Dim sb As New System.Text.StringBuilder
' sb.AppendLine(HelpSection.Help.<Logo>.Value)
' sb.AppendLine(HelpSection.Help.<Separator>.Value)
' sb.AppendLine(String.Format(" Executable name.......: {0}", HelpSection.Help.<Process>.Value))
' sb.AppendLine(String.Format(" Application name......: {0}", HelpSection.Help.<Name>.Value))
' sb.AppendLine(String.Format(" Application version...: {0}", HelpSection.Help.<Version>.Value))
' sb.AppendLine(String.Format(" Application author....: {0}", HelpSection.Help.<Author>.Value))
' sb.AppendLine(String.Format(" Application copyright.: {0}", HelpSection.Help.<Copyright>.Value))
' sb.AppendLine(String.Format(" Author website........: {0}", HelpSection.Help.<Website>.Value))
' sb.AppendLine(String.Format(" Author Skype..........: {0}", HelpSection.Help.<Skype>.Value))
' sb.AppendLine(String.Format(" Author Email..........: {0}", HelpSection.Help.<Email>.Value))
' sb.AppendLine(HelpSection.Help.<Separator>.Value)
' sb.AppendLine(HelpSection.Help.<Syntax>.Value)
' sb.AppendLine(HelpSection.Help.<SyntaxExtra>.Value)
' sb.AppendLine(HelpSection.Help.<UsageExamples>.Value)
' HelpSection.WriteLine(sb.ToString)
' Threading.Thread.Sleep(60000)
' End Sub
'End Module
#End Region
#Region " Example With Colorization "
'Module Module1
' Sub Main()
' Console.Title = HelpSection.ColorizedHelp.<Title>.Value
' Dim sb As New System.Text.StringBuilder
' sb.AppendLine(HelpSection.ColorizedHelp.<Logo>.Value)
' sb.AppendLine(HelpSection.ColorizedHelp.<Separator>.Value)
' sb.AppendLine(String.Format(" Executable name.......: {0}", HelpSection.ColorizedHelp.<Process>.Value))
' sb.AppendLine(String.Format(" Application name......: {0}", HelpSection.ColorizedHelp.<Name>.Value))
' sb.AppendLine(String.Format(" Application version...: {0}", HelpSection.ColorizedHelp.<Version>.Value))
' sb.AppendLine(String.Format(" Application author....: {0}", HelpSection.ColorizedHelp.<Author>.Value))
' sb.AppendLine(String.Format(" Application copyright.: {0}", HelpSection.ColorizedHelp.<Copyright>.Value))
' sb.AppendLine(String.Format(" Author website........: {0}", HelpSection.ColorizedHelp.<Website>.Value))
' sb.AppendLine(String.Format(" Author Skype..........: {0}", HelpSection.ColorizedHelp.<Skype>.Value))
' sb.AppendLine(String.Format(" Author Email..........: {0}", HelpSection.ColorizedHelp.<Email>.Value))
' sb.AppendLine(HelpSection.ColorizedHelp.<Separator>.Value)
' sb.AppendLine(HelpSection.ColorizedHelp.<Syntax>.Value)
' sb.AppendLine(HelpSection.ColorizedHelp.<SyntaxExtra>.Value)
' sb.AppendLine(HelpSection.ColorizedHelp.<UsageExamples>.Value)
' WriteColoredTextLine(sb.ToString, {"*"c})
' Threading.Thread.Sleep(60000)
' End Sub
'End Module
#End Region
#End Region
#Region " ConsoleColor Enumeration Helper "
' Black = 0
' DarkBlue = 1
' DarkGreen = 2
' DarkCyan = 3
' DarkRed = 4
' DarkMagenta = 5
' DarkYellow = 6
' Gray = 7
' DarkGray = 8
' Blue = 9
' Green = 10
' Cyan = 11
' Red = 12
' Magenta = 13
' Yellow = 14
' White = 15
#End Region
#Region " HelpSection "
Friend Class HelpSection
#Region " Members "
''' <summary>
''' Indicates dynamically the name of the current process.
''' </summary>
Private Shared ReadOnly ProcessName As String =
Process.GetCurrentProcess().MainModule.ModuleName
''' <summary>
''' Use this var into an XML if need to escape an 'GreaterThan' character.
''' </summary>
Private ReadOnly c_GreaterThan As Char = ">"c
''' <summary>
''' Use this var into an XML if need to escape an 'LowerThan' character.
''' </summary>
Private ReadOnly c_LowerThan As Char = "<"c
#End Region
#Region " Help Text "
''' <summary>
''' Contains Help information such as Author, Syntax and Example usages.
''' </summary>
Friend Shared ReadOnly Help As XElement =
<Help>
<!-- Current process name -->
<!-- That means even when the user manually changes the executable name -->
<Process><%= ProcessName %></Process>
<!-- Application title -->
<Title>My Application .:: By Elektro ::.</Title>
<!-- Application name -->
<Name>My Application</Name>
<!-- Application author -->
<Author>Elektro</Author>
<!-- Application version -->
<Version>1.0</Version>
<!-- Copyright information -->
<Copyright>© Elektro Software 2014</Copyright>
<!-- Website information -->
<Website>http://foro.elhacker.net</Website>
<!-- Skype contact information -->
<Skype>ElektroStudios</Skype>
<!-- Email contact information -->
<Email>ElektroStudios@ElHacker.Net</Email>
<!-- Application Logotype -->
<Logo>
.____
| | ____ ____ ____
| | / _ \ / ___\ / _ \
| |__( |_| ) /_/ > |_| )
|_______ \____/\___ / \____/
\/ /____/
</Logo>
<!-- Separator shape -->
<Separator>
------------------------------------------------------>>>>
</Separator>
<!-- Application Syntax -->
<Syntax>
[+] Syntax
<%= ProcessName %> (SWITCH)=(VALUE) (IN FILE)
</Syntax>
<!-- Application Syntax (Additional Specifications) -->
<SyntaxExtra>
[+] Switches
/Switch1 | Description.
/Switch2 | Description.
|
/? | Display this help.
[+] Switch value types
/Switch1 (INT)
/Switch2 (X,Y)
</SyntaxExtra>
<!-- Application Usage Examples -->
<UsageExamples>
[+] Usage examples
<%= ProcessName %> /Switch1=Value "C:\File.txt"
( Command explanation )
</UsageExamples>
</Help>
''' <summary>
''' Contains Help information such as Author, Syntax and Example usages.
''' These strings are color-delimited to print a colorized output console,
''' using the 'WriteColoredText' methods written by Elektro.
''' </summary>
Friend Shared ReadOnly ColorizedHelp As XElement =
<Help>
<!-- Current process name -->
<!-- That means even when the user manually changes the executable name -->
<Process>*F10*<%= ProcessName %>*-F*</Process>
<!-- Application title -->
<Title>My Application .:: By Elektro ::.</Title>
<!-- Application name -->
<Name>*F10*My Application*-F*</Name>
<!-- Application author -->
<Author>*f10*Elektro*-F*</Author>
<!-- Application version -->
<Version>*F10*1.0*-F*</Version>
<!-- Copyright information -->
<Copyright>*F10*© Elektro Software 2014*-F*</Copyright>
<!-- Website information -->
<Website>*F10*http://foro.elhacker.net*-F*</Website>
<!-- Skype contact information -->
<Skype>*F10*ElektroStudios*-F*</Skype>
<!-- Email contact information -->
<Email>*F10*ElektroStudios@ElHacker.Net*-F*</Email>
<!-- Application Logotype -->
<Logo>*F11*
.____
| | ____ ____ ____
| | / _ \ / ___\ / _ \
| |__( |_| ) /_/ > |_| )
|_______ \____/\___ / \____/
\/ /____/
*-F*</Logo>
<!-- Separator shape -->
<Separator>
*F11*------------------------------------------------------>>>>*-F*
</Separator>
<!-- Application Syntax -->
<Syntax>
*F11*[+]*-F* *F14*Syntax*-F*
<%= ProcessName %> *F10*(SWITCH)*-F*=*F10*(VALUE)*-F* *F10*(IN FILE)*-F*
</Syntax>
<!-- Application Syntax (Additional Specifications) -->
<SyntaxExtra>
*F11*[+]*-F* *F14*Switches*-F*
*F10*/Switch1*-F* | *F11*Description.*-F*
*F10*/Switch2*-F* | *F11*Description.*-F*
*F10* *-F* |
*F10*/? *-F* | *F11*Display this help.*-F*
*F11*[+]*-F* *F14*Switch value types*-F*
*F10*/Switch1*-F* (*F11*INT*-F*)
*F10*/Switch2*-F* (*F11*X,Y*-F*)
</SyntaxExtra>
<!-- Application Usage Examples -->
<UsageExamples>
*F11*[+]*-F* *F14*Usage examples*-F*
<%= ProcessName %> /Switch1=Value "C:\File.txt"
*F11*( Command explanation )*-F*
</UsageExamples>
</Help>
#End Region
End Class
#End Region
#Region " Write Colored Text "
' Name.......: Write Colored Text
' Author.....: Elektro
' Description: Methods to write colorized strings.
' Last Update: 05/01/2014
' References.: LINQ
' Indications: Use *F##* as the ForeColor beginning delimiter, use *-F* to restore the console forecolor.
' Use *B##* as the BackColor beginning delimiter, use *-B* to restore the console BackColor.
'
' Example Usages:
'
' WriteColoredText( " Hello World! ", ConsoleColor.Blue, ConsoleColor.Blue)
' WriteColoredTextLine(" Hello World! ", ConsoleColor.Magenta, ConsoleColor.Gray)
' WriteColoredTextLine(" Hello World! ", Nothing, Nothing)
'
' WriteColoredText("*F10*Hello *F14*World!*-F*", {"*"c})
' WriteColoredTextLine("{B15}{F12} Hello World! {-F}{-B}", {"{"c, "}"c})
' WriteColoredTextLine(String.Format("*B15**F12* {0} *F0*{1} *-F**-B*", "Hello", "World!"), {"*"c})
''' <summary>
''' Writes colored text on the Console.
''' </summary>
''' <param name="Text">Indicates the color-delimited text to parse and then write.</param>
''' <param name="Delimiters">Indicates a set of (1 or 2) delimiters to parse a color-delimited string.</param>
Friend Sub WriteColoredText(ByVal Text As String,
ByVal Delimiters As Char())
' Store the current console colors to restore them later.
Dim CurrentForegroundColor As ConsoleColor = Console.ForegroundColor
Dim CurrentBackgroundColor As ConsoleColor = Console.BackgroundColor
' Split the string to retrieve and parse the color-delimited strings.
Dim StringParts As String() =
Text.Split(Delimiters, StringSplitOptions.RemoveEmptyEntries)
' Parse the string parts
For Each part As String In StringParts
If part.ToUpper Like "F#" _
OrElse part.ToUpper Like "F##" Then ' Change the ForeColor.
Console.ForegroundColor = CInt(part.Substring(1))
ElseIf part.ToUpper Like "B#" _
OrElse part.ToUpper Like "B##" Then ' Change the BackgroundColor.
Console.BackgroundColor = CInt(part.Substring(1))
ElseIf part.ToUpper Like "-F" Then ' Restore the original Forecolor.
Console.ForegroundColor = CurrentForegroundColor
ElseIf part.ToUpper Like "-B" Then ' Restore the original BackgroundColor.
Console.BackgroundColor = CurrentBackgroundColor
Else ' String part is not a delimiter so we can print it.
Console.Write(part)
End If
Next part
' Finish by restoring the original console colors.
Console.BackgroundColor = CurrentBackgroundColor
Console.ForegroundColor = CurrentForegroundColor
End Sub
''' <summary>
''' Writes colored text on the Console.
''' </summary>
''' <param name="Text">Indicates the text to write.</param>
''' <param name="ForeColor">Indicates the text color.</param>
''' <param name="BackColor">Indicates the background color.</param>
Friend Sub WriteColoredText(ByVal Text As String,
ByVal ForeColor As ConsoleColor,
ByVal BackColor As ConsoleColor)
' Store the current console colors to restore them later.
Dim CurrentForegroundColor As ConsoleColor = Console.ForegroundColor
Dim CurrentBackgroundColor As ConsoleColor = Console.BackgroundColor
' Set the new temporal console colors.
Console.ForegroundColor = If(ForeColor = Nothing, CurrentForegroundColor, ForeColor)
Console.BackgroundColor = If(BackColor = Nothing, CurrentBackgroundColor, BackColor)
' Print the text.
Console.Write(Text)
' Finish by restoring the original console colors.
Console.ForegroundColor = CurrentForegroundColor
Console.BackgroundColor = CurrentBackgroundColor
End Sub
''' <summary>
''' Writes colored text on the Console and adds an empty line at the end.
''' </summary>
''' <param name="Text">Indicates the color-delimited text to parse and then write.</param>
''' <param name="Delimiters">Indicates a set of (1 or 2) delimiters to parse a color-delimited string.</param>
Friend Sub WriteColoredTextLine(ByVal Text As String,
ByVal Delimiters As Char())
WriteColoredText(Text & Environment.NewLine, Delimiters)
End Sub
''' <summary>
''' Writes colored text on the Console and adds an empty line at the end.
''' </summary>
''' <param name="Text">Indicates the color-delimited text to parse and then write.</param>
''' <param name="ForeColor">Indicates the text color.</param>
''' <param name="BackColor">Indicates the background color.</param>
Friend Sub WriteColoredTextLine(ByVal Text As String,
ByVal ForeColor As ConsoleColor,
ByVal BackColor As ConsoleColor)
WriteColoredText(Text & Environment.NewLine, ForeColor, BackColor)
End Sub
#End Region
<!-- Application Usage Examples -->
<UsageExamples>
{f11}[+]{-f} {f14}Usage examples{-f}
<%= ProcessName %> /Switch1=Value "C:\File.txt"
{f11}( Command explanation ){-f}
</UsageExamples>
Module Module1
Sub Main()
Console.Title = HelpSection.ColorizedHelp.<Title>.Value
Dim sb As New System.Text.StringBuilder
sb.AppendLine(HelpSection.ColorizedHelp.<Logo>.Value)
sb.AppendLine(HelpSection.ColorizedHelp.<Separator>.Value)
sb.AppendLine(HelpSection.ColorizedHelp.<Syntax>.Value)
sb.AppendLine(HelpSection.ColorizedHelp.<UsageExamples>.Value)
WriteColoredTextLine(sb.ToString, {"*"c})
' WriteColoredText(sb.ToString, {"*"c})
Threading.Thread.Sleep(60000)
End Sub
End Module
WriteColoredText(" Hello World! ", ConsoleColor.Blue, ConsoleColor.Blue)
WriteColoredTextLine(" Hello World! ", ConsoleColor.Magenta, ConsoleColor.Gray)
WriteColoredTextLine(" Hello World! ", Nothing, Nothing)
WriteColoredText("*F10*Hello *F14*World!*-F*", {"*"c})
WriteColoredTextLine("{B15}{F12} Hello World! {-F}{-B}", {"{"c, "}"c})
WriteColoredTextLine(String.Format("*B15**F12* {0} *F0*{1} *-F**-B*", "Hello", "World!"), {"*"c})
[+] Syntax:
DTEInstaller.exe [Mode] [Version] [Template] [Tab] [Assembly]
[+] Parameters:
Mode | Indicates the kind of operation to perform.
Version | Indicates the VisualStudio target version.
Template | Indicates the application template type.
Tab | Indicates the tab name to create on the Toolbox.
Assembly | Indicates the assembly filepath to install on the tab.
|
/? | Display this help.
[+] Allowed parameter values:
Mode:
"Install", "Uninstall"
Version:
"Vs2005", "Vs2008", "Vs2010", "Vs2012", "Vs2013"
Template:
"WF", "WPF"
Tab:
(Anything is allowed)
Assembly:
(The path of an existing assembly)
[+] Usage examples:
DTEInstaller.exe Install Vs2013 WF "Sample Tab" "C:\Sample UserControl.dll"
(Installs the user-control on the VisualStudio 2013 WindowsForms Toolbox)
You don't have permission to access /post2.html;start=0;board=XX on this server.
You don't have permission to access /pm.html;sa=send2 on this server.
Module Main
#Region " Variables "
''' <summary>
''' The chooseable menu items.
''' </summary>
Private ReadOnly MenuItems() As String =
{
"[1] One",
"[2] Two",
"[3] Three",
"[4] Four",
"[H] Help",
"[X] Exit"
}
''' <summary>
''' Indicates the selected menu item.
''' </summary>
Private CurrentMenuItem As Short = 0
''' <summary>
''' The object to read in a pressed key.
''' </summary>
Private key As ConsoleKeyInfo = Nothing
''' <summary>
''' Indicates wether the user pressed a valid key.
''' </summary>
Private ValidKeyIsPressed As Boolean = False
''' <summary>
''' To manage known errors.
''' </summary>
Private ReadOnly KnownErrors As New Dictionary(Of Integer, String) From
{
{1, "Wrong parameter"},
{2, "Parameter not specified"},
{9999, "Unknown Error"}
}
#End Region
#Region " Main Procedure "
''' <summary>
''' The main procedure of this application.
''' </summary>
Public Sub Main()
Console.Title = HelpSection.Title ' Set the Console Title.
ShowMenu() ' Display the console menu.
DoSomething()
Environment.Exit(0) ' Exit succesfully.
End Sub
#End Region
#Region " Methods "
''' <summary>
''' Displays the console menu.
''' </summary>
Private Sub ShowMenu()
' Wait for a valid key.
Do Until ValidKeyIsPressed
' Clear the screen.
Console.Clear()
' Print the application Logotype.
Write_Colored_Text(HelpSection.Logo, True, ConsoleColor.Green) ' Print the Logo.
' Print a simple help text.
Write_Colored_Text("[+] Choose an option:", True, ConsoleColor.White)
Console.WriteLine()
' Loop through all of the menu items to print them.
For Each MenuItem As String In MenuItems
If MenuItem = MenuItems.ElementAt(CurrentMenuItem) Then
Write_Colored_Text(String.Format(" -> {0}", MenuItem), True, ConsoleColor.Green)
Else
Write_Colored_Text(MenuItem, True, ConsoleColor.Gray)
End If
Next MenuItem
' Waits until the user presses a key.
key = Console.ReadKey(True)
' Process the pressed key.
Select Case key.Key
Case Keys.Down ' If the key the user pressed is a "DownArrow", the current menu item will deacrease.
CurrentMenuItem += 1
If CurrentMenuItem > MenuItems.Length - 1 Then
CurrentMenuItem = 0
End If
Case Keys.Up ' If the key the user pressed is a "UpArrow", the current menu item will increase.
CurrentMenuItem -= 1
If CurrentMenuItem < 0 Then
CurrentMenuItem = CShort(MenuItems.Length - 1)
End If
Case Keys.Enter ' Enter Key (Select current menu item).
ValidKeyIsPressed = True
Case Keys.D1 To Keys.D4 ' A numeric key is pressed between 1-4.
CurrentMenuItem = key.Key.ToString.Substring(1) - 1
ValidKeyIsPressed = True
Case Keys.H ' H Key (Print Help).
PrintHelp()
ValidKeyIsPressed = True
Case Keys.X ' X Key (Exit from application).
Environment.Exit(0)
End Select
Loop
End Sub
''' <summary>
''' Do something.
''' </summary>
Private Sub DoSomething()
Console.WriteLine()
Write_Colored_Text("User Pressed Key: " & key.Key.ToString, True, ConsoleColor.Red, ConsoleColor.White)
Write_Colored_Text("Selected Option : " & MenuItems(CurrentMenuItem), True, ConsoleColor.Red, ConsoleColor.White)
Write_Colored_Text("Selected Index : " & CurrentMenuItem.ToString, True, ConsoleColor.Red, ConsoleColor.White)
Console.ReadLine()
End Sub
#End Region
#Region " Miscellaneous Methods "
''' <summary>
''' Writes colored text on the Console.
''' </summary>
''' <param name="Text">Indicates the text to write.</param>
''' <param name="AddNewLine">Adds an empty line at the end of the text.</param>
''' <param name="ForeColor">Indicates the text color.</param>
''' <param name="BackColor">Indicates the background color.</param>
Private Sub Write_Colored_Text(ByVal Text As String,
Optional ByVal AddNewLine As Boolean = False,
Optional ByVal ForeColor As ConsoleColor = Nothing,
Optional ByVal BackColor As ConsoleColor = Nothing)
Dim CurrentForegroundColor As ConsoleColor = Console.ForegroundColor
Dim CurrentBackgroundColor As ConsoleColor = Console.BackgroundColor
Console.ForegroundColor = If(ForeColor = Nothing, CurrentForegroundColor, ForeColor)
Console.BackgroundColor = If(ForeColor = Nothing, CurrentBackgroundColor, BackColor)
If AddNewLine Then
Console.WriteLine(Text)
Else
Console.Write(Text)
End If
Console.ForegroundColor = CurrentForegroundColor
Console.BackgroundColor = CurrentBackgroundColor
End Sub
''' <summary>
''' Set the window state of the console.
''' </summary>
''' <param name="WindowState">Indicates the new state of the console window.</param>
Public Function SetWindow(ByVal WindowState As ConsoleWindowState.WindowState) As Boolean
Return ConsoleWindowState.SetWindowState(WindowState)
End Function
''' <summary>
''' Print the Help section and exits from the application.
''' </summary>
Private Sub PrintHelp()
Console.WriteLine(HelpSection.Help)
Environment.Exit(0) ' Exit succesfully.
End Sub
''' <summary>
''' Launch a known error and exits from the application.
''' </summary>
''' <param name="ErrorID">
''' Indicates the known Error Identifier.
''' This value is also used to specify the ExitCode.
''' </param>
''' <param name="MoreInfo">Indicates additional information.</param>
Private Sub LaunchError(ByVal ErrorID As Integer, Optional ByVal MoreInfo As String = Nothing)
Console.WriteLine()
Write_Colored_Text(KnownErrors(ErrorID) &
If(MoreInfo IsNot Nothing, ": " & MoreInfo, Nothing),
True, ConsoleColor.White, ConsoleColor.DarkRed)
Environment.Exit(ErrorID) ' Exit with error exitcode.
End Sub
#End Region
End Module
Module Main
#Region " Variables "
''' <summary>
''' Here will be stored the commandline arguments for this application.
''' If DebugArguments is nothing then the normal arguments are used,
''' Otherwise, the custom debug arguments are used.
''' </summary>
Private Arguments As IEnumerable(Of String) =
Set_CommandLine_Arguments(<a><![CDATA[/Switch1=Value1 /Switch2="Value2"]]></a>.Value)
''' <summary>
''' Something.
''' </summary>
Private Something As String = Nothing
''' <summary>
''' To manage known errors.
''' </summary>
Private ReadOnly KnownErrors As New Dictionary(Of Integer, String) From
{
{1, "Wrong parameter"},
{2, "Parameter not specified"},
{9999, "Unknown Error"}
}
#End Region
#Region " DEBUG CommandLine Arguments "
''' <summary>
''' Set the commandline arguments of this application for testing purposes.
''' </summary>
Public Function Set_CommandLine_Arguments(Optional ByVal DebugArguments As String = Nothing) As IEnumerable(Of String)
#If DEBUG Then
' Código eliminado porque el foro tiene un bug al parsear los caracteres...
End Function
#End Region
#Region " Main Procedure "
''' <summary>
''' The main procedure of this application.
''' </summary>
Public Sub Main()
Console.Title = HelpSection.Title ' Set the Console Title.
Write_Colored_Text(HelpSection.Logo, True, ConsoleColor.Green) ' Print the Logo.
Write_Colored_Text("Arguments: " & Join_Arguments(Arguments), True, ConsoleColor.DarkGray) ' Print the Arguments.
Parse_Arguments() ' Processes the arguments passed to the application.
DoSomething() ' Do Something and wait.
Environment.Exit(0) ' Exit succesfully.
End Sub
#End Region
#Region " Methods "
''' <summary>
''' Parses the Arguments passed to this application.
''' </summary>
Private Sub Parse_Arguments()
' Arguments Are Empty?.
If Arguments_Are_Empty(Arguments) Then
PrintHelp()
End If
' Parse arguments.
For Each Argument As String In Arguments
Select Case True
Case Argument.StartsWith("/Switch1=", StringComparison.InvariantCultureIgnoreCase)
' Something = Argument.Substring(Argument.IndexOf("=") + 1)
End Select
Next Argument
If Something Is Nothing Then
LaunchError(1, "/Switch1")
End If
End Sub
''' <summary>
''' Do something and wait.
''' </summary>
Private Sub DoSomething()
Do Until Something = "Something Else"
Application.DoEvents()
Loop
End Sub
#End Region
#Region " Miscellaneous Methods "
''' <summary>
''' Check if the arguments are empty.
''' </summary>
''' <param name="DebugArguments">Indicates a custom arguments to check.</param>
Private Function Arguments_Are_Empty(Optional ByVal DebugArguments As IEnumerable(Of String) = Nothing) As Boolean
Return Not Convert.ToBoolean(If(DebugArguments IsNot Nothing,
DebugArguments.Count,
Environment.GetCommandLineArgs.Skip(1).Count))
End Function
''' <summary>
''' Joins the Arguments to return a single String.
''' </summary>
''' <param name="DebugArguments">Indicates a custom arguments to join.</param>
Private Function Join_Arguments(Optional ByVal DebugArguments As IEnumerable(Of String) = Nothing) As String
Return String.Join(Convert.ToChar(Keys.Space),
If(DebugArguments IsNot Nothing,
DebugArguments,
Environment.GetCommandLineArgs.Skip(1)))
End Function
''' <summary>
''' Writes colored text on the Console.
''' </summary>
''' <param name="Text">Indicates the text to write.</param>
''' <param name="AddNewLine">Adds an empty line at the end of the text.</param>
''' <param name="ForeColor">Indicates the text color.</param>
''' <param name="BackColor">Indicates the background color.</param>
Private Sub Write_Colored_Text(ByVal Text As String,
Optional ByVal AddNewLine As Boolean = False,
Optional ByVal ForeColor As ConsoleColor = Nothing,
Optional ByVal BackColor As ConsoleColor = Nothing)
Console.ForegroundColor = If(ForeColor = Nothing, Console.ForegroundColor, ForeColor)
Console.BackgroundColor = If(ForeColor = Nothing, Console.BackgroundColor, BackColor)
If AddNewLine Then
Console.WriteLine(Text)
Else
Console.Write(Text)
End If
Console.ForegroundColor = If(ForeColor = Nothing, Console.ForegroundColor, ForeColor)
Console.BackgroundColor = If(ForeColor = Nothing, Console.BackgroundColor, BackColor)
End Sub
''' <summary>
''' Set the window state of the console.
''' </summary>
''' <param name="WindowState">Indicates the new state of the console window.</param>
Public Function SetWindow(ByVal WindowState As ConsoleWindowState.WindowState) As Boolean
Return ConsoleWindowState.SetWindowState(WindowState)
End Function
''' <summary>
''' Print the Help section and exits from the application.
''' </summary>
Private Sub PrintHelp()
Console.WriteLine(HelpSection.Help)
Environment.Exit(0) ' Exit succesfully.
End Sub
''' <summary>
''' Launch a known error and exits from the application.
''' </summary>
''' <param name="ErrorID">
''' Indicates the known Error Identifier.
''' This value is also used to specify the ExitCode.
''' </param>
''' <param name="MoreInfo">Indicates additional information.</param>
Private Sub LaunchError(ByVal ErrorID As Integer, Optional ByVal MoreInfo As String = Nothing)
Console.WriteLine()
Write_Colored_Text(KnownErrors(ErrorID) &
If(MoreInfo IsNot Nothing, ": " & MoreInfo, Nothing),
True, ConsoleColor.White, ConsoleColor.DarkRed)
Environment.Exit(ErrorID) ' Exit with error exitcode.
End Sub
#End Region
#Region " Event Handlers "
' Add here your EventHandlers.
#End Region
End Module
CitarParse(Type, String, Boolean)
Private Enum Test
A
a
End Enum
Private Function Enum_Parser(Of T)(Value As Object) As T
Try
Return [Enum].Parse(GetType(T), Value, True)
Catch ex As ArgumentException
Throw New Exception("Value not found")
Catch ex As Exception
Throw New Exception(String.Format("{0}: {1}}", ex.Message, ex.StackTrace))
End Try
End Function
Carpeta de canciones
----Subcarpetas de 1 nivel, que contienen archivos de audio.
Carpeta de líricas que contiene archivos txt o lrc.
Carpeta de videoclips
----Subcarpetas de 1 nivel, que contienen archivos de video.
69 Eyes - We Own The Night;192;03:57;5,52
A City Serene - I Guess It's Curtains For You;192;03:52;5,32
A City Serene - The Escape;192;04:19;5,93
A City Serene - Walk The Plank;192;03:26;4,73
A City Serene - With Swords Crossed;192;03:22;4,64
A Day To Remember - Another Song About The Weekend;230;03:45;6,44
A Day To Remember - Downfall Of Us All;231;03:29;6,02
etc...
etc...
etc...
Cita de: Un usuario cualquieraHola se busca programador con conocimientos de Python y pyQT4 para desarrollar una aplicación que me haga "X" tarea, pago bien
Cita de: Un usuario cualquieraNombre....: Pablo
Pais......: España
Ciudad....: Madrid
Requisitos: C/C++
Coste.....: 30 €
Modo Pago.: Paypal
Asunto....:
Hola se busca programador con conocimientos de C/C++ para llevar a cabo una aplicación que envie emails a mi dirección de correo constántemente.
Cita de: Un usuario cualquieraNombre....: Jaime
Pais......: España
Ciudad....: Barcelona
Salario...: PREGUNTAR
Modo Pago.: Paypal o Ingreso bancario
Asunto....:
Hola ofrezco mis servicios a todas las personas que estén interesadas
Soy programador, tengo un nivel de conocimientos medio en Java y alto en C#..
Aunque mi especialidad es el Hardware, puedo quedar en persona por la zona de Barcelona para reparar equipos.
_______ _______ __
| _ || |.-----..-----.| |
|. 1___||.| | || _ || _ || |
|. |___ `-|. |-'|_____||_____||__|
|: 1 | |: |
|::.. . | |::.| Conversion
`-------' `---' Tool
By Elektro H@cker
[+] Syntax:
CTool.exe [Filesize] [From Unit] [To Unit] [Precision]
* Where Units are: B, KB, MB, GB, TB, PB.
[+] Usage examples:
# Convert Bytes to Megabytes:
CTool.exe 446.777.647.104 B MB
# Convert Bytes to Megabytes with 3 decimal precision:
CTool.exe 446.777.647.104 B MB 3
# Convert Megabytes to Kilobytes:
CTool.exe 44.33 MB KB
___ _ _ ___ _
| __| (_) | | ___ | \ __ _ | |_ ___
| _| | | | | / -_) | |) | / _` | | _| / -_)
|_| |_| |_| \___| |___/ \__,_| _\__| \___|
|"""""|_|"""""|_|"""""|_|"""""|
By Elektro H@cker .'`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
[+] Syntax:
FileDate.exe [Action] [Switches] [Date] [File or Directory]
NOTE: Date Syntax variants can be written as one of these:
"DD-MM-YYYY"
"DD/MM/YYYY"
"DD-MM-YYYY NN"
"DD/MM/YYYY NN"
"DD-MM-YYYY NN:NN"
"DD/MM/YYYY NN:NN"
"DD-MM-YYYY NN:NN:NN"
"DD/MM/YYYY NN:NN:NN"
[+] Actions:
-Get | Retrieve the date(s) of a file.
-Set | Set the date(s) of a file.
[+] Switches:
/C | Get or Set Creation Date.
/M | Get or Set Modification Date.
/A | Get or Set LastAccess Date.
|
/R | Recursive subdirectories (when folder is specified instead file).
/V | Display verbose information.
|
/? | Display this help.
[+] Usage examples:
# Get Creation date of "C:\File.txt":
-----------------------------------
FileDate.exe -Get /C "C:\File.txt"
# Get Creation, Modification and LastAcces date of "C:\File.txt":
-----------------------------------
FileDate.exe -Get /C /M /A "C:\File.txt"
# Set Creation date of "C:\File.txt":
-----------------------------------
FileDate.exe -Set /C "01/01/2013 23:59:59" "C:\File.txt"
# Set Creation and modification date of "C:\File.txt":
----------------------------------------------------
FileDate.exe -Set /C /M "01/01/2013" "C:\File.txt"
# Set LastAcces Date of all files in "C:\Directory":
--------------------------------------------------
FileDate.exe -Set /R /A "01/01/2013" "C:\Directory"
# Set Creation, Modification and LastAcces Date of all files in "C:\Directory",
And also displays extended information about the Date changes:
--------------------------------------------------------------
FileDate.exe -Set /R /V /C /M /A "01/01/2013" "C:\Directory"
[+] Syntax:
DoCrypt.exe [Switch] [TextFile]
[+] Switches:
/P (or) /Protect | Protect text file.
/U (or) /Unprotect | Unprotect text file.
[+] Usage examples:
# Protect file:
DoCrypt.exe /P "Document.txt"
# Unprotect file:
DoCrypt.exe /U "Protected Document.txt"
|---------------------------------------|
| Documento con contraseñas importantes |
|---------------------------------------|
ñáéíóúñ
bla bla bla bla
bla bla bla bla bla bla bla bla
bla bla
bla bla bla
bla bla bla bla
ZkMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExYdz0=
ZkNCRWIyTjFiV1Z1ZEc4Z1kyOXVJR052Ym5SeVlYTmw4V0Z6SUdsdGNHOXlkR0Z1ZEdWeklIdz0=
ZkMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExTMHRMUzB0TFMwdExYdz0=
OGVIcDdmUDY4UT09
WW14aElHSnNZU0JpYkdFZ1lteGg=
WW14aElHSnNZU0JpYkdFZ1lteGhJR0pzWVNCaWJHRWdZbXhoSUdKc1lRPT0=
WW14aElHSnNZUT09
WW14aElHSnNZU0JpYkdFPQ==
WW14aElHSnNZU0JpYkdFZ1lteGg=
|---------------------------------------|
| Documento con contraseñas importantes |
|---------------------------------------|
ñáéíóúñ
bla bla bla bla
bla bla bla bla bla bla bla bla
bla bla
bla bla bla
bla bla bla bla
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\AC3Filter]
[HKEY_CURRENT_USER\Software\AC3Filter\preset]
[HKEY_CURRENT_USER\Software\AC3Filter\preset\Default]
"formats"=dword:000064e0
VgB3AEIAcABBAEcANABBAFoAQQBCAHYAQQBIAGMAQQBjAHcAQQBnAEEARgBJAEEAWgBRAEIAbgBBAEcAawBBAGMAdwBCADAAQQBIAEkAQQBlAFEAQQBnAEEARQBVAEEAWgBBAEIAcABBAEgAUQBBAGIAdwBCAHkAQQBDAEEAQQBWAGcAQgBsAEEASABJAEEAYwB3AEIAcABBAEcAOABBAGIAZwBBAGcAQQBEAFUAQQBMAGcAQQB3AEEARABBAEEA
VwB3AEIASQBBAEUAcwBBAFIAUQBCAFoAQQBGADgAQQBRAHcAQgBWAEEARgBJAEEAVQBnAEIARgBBAEUANABBAFYAQQBCAGYAQQBGAFUAQQBVAHcAQgBGAEEARgBJAEEAWABBAEIAVABBAEcAOABBAFoAZwBCADAAQQBIAGMAQQBZAFEAQgB5AEEARwBVAEEAWABBAEIAQgBBAEUATQBBAE0AdwBCAEcAQQBHAGsAQQBiAEEAQgAwAEEARwBVAEEAYwBnAEIAZABBAEEAPQA9AA==
VwB3AEIASQBBAEUAcwBBAFIAUQBCAFoAQQBGADgAQQBRAHcAQgBWAEEARgBJAEEAVQBnAEIARgBBAEUANABBAFYAQQBCAGYAQQBGAFUAQQBVAHcAQgBGAEEARgBJAEEAWABBAEIAVABBAEcAOABBAFoAZwBCADAAQQBIAGMAQQBZAFEAQgB5AEEARwBVAEEAWABBAEIAQgBBAEUATQBBAE0AdwBCAEcAQQBHAGsAQQBiAEEAQgAwAEEARwBVAEEAYwBnAEIAYwBBAEgAQQBBAGMAZwBCAGwAQQBIAE0AQQBaAFEAQgAwAEEARgAwAEEA
VwB3AEIASQBBAEUAcwBBAFIAUQBCAFoAQQBGADgAQQBRAHcAQgBWAEEARgBJAEEAVQBnAEIARgBBAEUANABBAFYAQQBCAGYAQQBGAFUAQQBVAHcAQgBGAEEARgBJAEEAWABBAEIAVABBAEcAOABBAFoAZwBCADAAQQBIAGMAQQBZAFEAQgB5AEEARwBVAEEAWABBAEIAQgBBAEUATQBBAE0AdwBCAEcAQQBHAGsAQQBiAEEAQgAwAEEARwBVAEEAYwBnAEIAYwBBAEgAQQBBAGMAZwBCAGwAQQBIAE0AQQBaAFEAQgAwAEEARgB3AEEAUgBBAEIAbABBAEcAWQBBAFkAUQBCADEAQQBHAHcAQQBkAEEAQgBkAEEAQQA9AD0A
SQBnAEIAbQBBAEcAOABBAGMAZwBCAHQAQQBHAEUAQQBkAEEAQgB6AEEAQwBJAEEAUABRAEIAawBBAEgAYwBBAGIAdwBCAHkAQQBHAFEAQQBPAGcAQQB3AEEARABBAEEATQBBAEEAdwBBAEQAWQBBAE4AQQBCAGwAQQBEAEEAQQA=
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\AC3Filter]
[HKEY_CURRENT_USER\Software\AC3Filter\preset]
[HKEY_CURRENT_USER\Software\AC3Filter\preset\Default]
"formats"=dword:000064e0
[+] Syntax:
RepairShortcuts.exe [Switches] [File or Directory]
[+] Switches:
/NoUI | Don't display MessageBox if shortcut can't be resolved.
/R | Recursive subdirectories.
/V | Display verbose information.
|
/? | Display this help.
[+] Usage examples:
# Repair "C:\Shortcut.lnk" shortcut:
RepairShortcuts.exe "C:\Shortcut.lnk"
# Repair all shortcuts in "C:\Directory":
RepairShortcuts.exe "C:\Directory"
# Repair all shortcuts in "C:\Directory" without displaying any MessageBox:
RepairShortcuts.exe /NoUI "C:\Directory"
# Repair all shortcuts in "C:\" and their subfolders:
RepairShortcuts.exe /R "C:\Directory"
# Repair all shortcuts in "C:\Directory" and their subfolders,
also displays verbose information when reparing,
and don't display any error MessageBox:
RepairShortcuts.exe /R /V /NoUI "C:\Directory"
Nombre de carpeta: Debug
Ruta completa...: C:\Visual Studio Projects\CopyPath\CopyPath\bin\Debug
Letra de unidad.: C:\
Fecha de creación.....: 15/09/2013 16:03:19
Fecha de modificación.: 17/09/2013 8:40:55
Fecha de último acceso: 17/09/2013 8:40:55
Longitud de ruta completa....: 53
Longitud de nombre de carpeta: 5
Tamaño en Bytes....: 155.002 Bytes
Tamaño en Kilobytes: 151,37 KB
Tamaño en Megabytes: 0,15 MB
Tamaño en GigaBytes: 0,00 GB
Tamaño en TeraBytes: 0,00 TB
Nombre de archivo: CopyInfo.exe
Ruta completa...: D:\Utilidades\Registros\Menú contextual\CopyInfo.exe Setup\{sys}\CopyInfo.exe
Directorio......: D:\Utilidades\Registros\Menú contextual\CopyInfo.exe Setup\{sys}
Letra de unidad.: D:\
Extensión de archivo: exe
Atributos de archivo: Archive, NotContentIndexed
Versión de archivo..: 1.0.0.0
Fecha de creación.....: 16/09/2013 21:39:42
Fecha de modificación.: 17/09/2013 8:33:01
Fecha de último acceso: 16/09/2013 21:39:42
Longitud de ruta de acceso...: 85
Longitud de directorio.......: 72
Longitud de nombre de archivo: 12
Tamaño en Bytes....: 35.840 Bytes
Tamaño en Kilobytes: 35,00 KB
Tamaño en Megabytes: 0,03 MB
Tamaño en GigaBytes: 0,00 GB
Tamaño en TeraBytes: 0,00 TB
Citar ______ _______ ___
| |.-----.-----.--.--. |_ _|.-----.' _|.-----.
| ---|| _ | _ | | | _| |_ | | _|| _ |
|______||_____| __|___ | |_______||__|__|__| |_____|
|__| |_____| By Elektro H@cker
[+] Syntax:
CopyInfo.exe [Switch] [FILE or FOLDER]
[+] Switches:
/? | Display this help
|
/fullname | Return Full path
/filename | Return Filename (including extension)
/Dir | Return Directory name
/Size | Return Size (In bytes)
/Attrib | Return Attributes
/CreationTime | Return Creation date
/ModifyTime | Return Modification date
/AccessTime | Return Last access date
/FullnameLen | Return Full path length
/FilenameLen | Return Filename length
/DirLen | Return Directory length
/FileList | Return directory file list
/FileListRec | Return directory file list (recursive)
/Report | Return a report with all of this and additional info.
|
/C | Send the info to Clipboard.
| NOTE: Use this switch as last argument.
[+] Usage examples:
Program.exe /fullname ".\File.txt"
# Returns the full path. (Ex: C:\File.txt)
Program.exe /fullname ".\File.txt" /C
# Returns the full path and copy it into Clipboard. (Ex: C:\File.txt)
Program.exe /drive "C:\File.txt"
# Returns the drive letter. (Ex: C:\)
Program.exe /size "C:\File.txt"
# Returns the size in bytes. (Ex: 100024)
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "ConfirmFileDelete" /T "REG_DWORD" /D "0x00000001" /F
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "ConfirmFileDelete" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /V "MultipleInvokePromptMinimum" /T "REG_DWORD" /D "0x00002710" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "" /D ".: Modo Dios :." /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "InfoTip" /T "REG_SZ" /D "Todo lo que Dios puede hacer..." /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "System.ControlPanel.Category" /T "REG_SZ" /D "5" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}\DefaultIcon" /V "" /D "%%SystemRoot%%\\System32\\imageres.dll,-27" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}\Shell\Open\Command" /V "" /D "explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{D15ED2E1-C75B-443c-BD7C-FC03B2F08C17}" /V "" /D ".: Modo Dios :." /F
REG ADD "HKCU\Software\Microsoft\Command Processor" /V "Autorun" /T "REG_SZ" /D "CHCP 1252 1>NUL" /F
REG ADD HKCU\Console\^%%SystemRoot^%%_system32_cmd.exe /V "QuickEdit" /T "REG_DWORD" /D "0x00000001" /F
powercfg -h off
bcdedit /set {current} quietboot Yes
Echo [+] Desactivar el contador del tiempo de bloqueo de cuenta de usuario
net accounts /lockoutwindow:0
Echo [+] Desactivar la duración de bloqueo de cuenta de usuario
net accounts /lockoutduration:0
Echo [+] Desactivar el contador de intentos inválidos de acceso de cuenta de usuario
net accounts /lockoutthreshold:999
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V "NoDriveTypeAutoRun"" /T "REG_DWORD" /D "0x00000001" /F
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" /V "DisableAutoplay" /T "REG_DWORD" /D "0x00000001" /F
@Echo Off & SetLocal EnableDelayedExpansion
REM By Elektro H@cker
::: 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
@Echo OFF
REG ADD "HKEY_CLASSES_ROOT\DesktopBackground\Shell\.Accesorios" /V "MUIVerb" /T "REG_SZ" /D "Accesorios" /F
REG ADD "HKEY_CLASSES_ROOT\DesktopBackground\Shell\.Accesorios" /V "SubCommands" /T "REG_SZ" /D "Bloc de notas;Calculadora;Grabadora de sonidos;Grabacion de acciones;Mapa de caracteres;Notas;Paint;Recortes" /F
REG ADD "HKEY_CLASSES_ROOT\DesktopBackground\Shell\.Accesorios" /V "icon" /T "REG_SZ" /D "imageres.dll,-109" /F
REG ADD "HKEY_CLASSES_ROOT\DesktopBackground\Shell\.Accesorios" /V "position" /T "REG_SZ" /D "Bottom" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc de notas" /V "" /D "Bloc de notas" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc de notas" /V "icon" /T "REG_SZ" /D "notepad.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Bloc de notas\command" /V "" /D "notepad.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora" /V "" /D "Calculadora" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora" /V "icon" /T "REG_SZ" /D "calc.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Calculadora\command" /V "" /D "calc.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora de sonidos" /V "" /D "Grabadora de sonidos" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora de sonidos" /V "icon" /T "REG_SZ" /D "SoundRecorder.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabadora de sonidos\command" /V "" /D "SoundRecorder.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion de acciones" /V "" /D "Grabación de acciones" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion de acciones" /V "icon" /T "REG_SZ" /D "psr.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Grabacion de acciones\command" /V "" /D "psr.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa de caracteres" /V "" /D "Mapa de caracteres" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa de caracteres" /V "icon" /T "REG_SZ" /D "charmap.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Mapa de caracteres\command" /V "" /D "charmap.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas" /V "" /D "Notas" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas" /V "icon" /T "REG_SZ" /D "StikyNot.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Notas\command" /V "" /D "StikyNot.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint" /V "" /D "Paint" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint" /V "icon" /T "REG_SZ" /D "mspaint.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Paint\command" /V "" /D "mspaint.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes" /V "" /D "Recortes" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes" /V "icon" /T "REG_SZ" /D "SnippingTool.exe" /F
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Recortes\command" /V "" /D "SnippingTool.exe" /F
@Echo OFF
REM By Elektro H@cker
REG ADD "HKCR\*\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F
REG ADD "HKCR\*\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F
REG ADD "HKCR\*\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F
REG ADD "HKCR\*\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F
REG ADD "HKCR\Folder\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F
REG ADD "HKCR\Folder\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F
REG ADD "HKCR\Folder\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F
REG ADD "HKCR\Folder\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F
REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F
REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F
REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F
REG ADD "HKCR\Directory\Background\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall" /F
REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "MUIVerb" /T "REG_SZ" /D "Seleccionar" /F
REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "position" /T "REG_SZ" /D "middle" /F
REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "icon" /T "REG_SZ" /D "imageres.dll,-5308" /F
REG ADD "HKCR\LibraryFolder\Background\shell\Seleccionar" /V "SubCommands" /T "REG_SZ" /D "Windows.selectall;Windows.selectnone;Windows.invertselection" /F