Code dedidado a otroyomimo. (no creo que me tire a la papelera el code por warez)
* Detecta si tienes instalado WinRAR y donde lo tienes instalado (32/64 bits).
* Si no tienes instalado WinRAR te lleva a la página oficial de descarga (diferencia entre inglés y español).
* Si tu WinRAR ya está activado te muestra tu licencia actual y te pregunta si deseas reemplarla por esta nueva.
* En caso de tener una licencia de 'Indetectables', solo te muesta la información de ésta.
Código: Seleccionar todo
'####################################################### _
### Indetectables WinRAR Licence By _ Shakespeare _ ### _
#######################################################
Option Explicit
Const LOCALE_USER_DEFAULT = &H400
Const LOCALE_SENGCOUNTRY = &H1002
Const LOCALE_SENGLANGUAGE = &H1001
Const LOCALE_SNATIVELANGNAME = &H4
Const LOCALE_SNATIVECTRYNAME = &H8
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, _
ByVal lpLCData As String, ByVal cchData As Long) As Long
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long
Public Function ObtenerIdioma(ByVal lInfo As Long) As String
Dim Buffer As String, Ret As String
Buffer = String$(256, 0)
Ret = GetLocaleInfo(LOCALE_USER_DEFAULT, lInfo, Buffer, Len(Buffer))
If Ret > 0 Then
ObtenerIdioma = Left$(Buffer, Ret - 1)
Else
ObtenerIdioma = ""
End If
End Function
Private Sub Form_Load()
If App.PrevInstance Then End
If ObtenerIdioma(LOCALE_SENGLANGUAGE) = "Spanish" Then
Timer1.Enabled = True
Else
Timer2.Enabled = True
End If
End Sub
Private Sub Timer1_Timer()
Me.Hide
If Not App.EXEName = "Indetectables WinRAR License®" Then End
On Error Resume Next
Dim key As Integer, reg As String, reg2 As String, lic As VbMsgBoxStyle
Dim sEquipo As String * 255
GetComputerName sEquipo, 255
Dim MiObjeto As Object
Set MiObjeto = CreateObject("Wscript.Shell")
LblWinRAR.Caption = MiObjeto.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe\Path") & "\"
Set MiObjeto = Nothing
If LblWinRAR.Caption = "" Then
If MsgBox("WinRAR no está instalado en su equipo." & vbCrLf & vbCrLf & "¿ Desea ir al centro oficial de descargas ?", vbQuestion + vbYesNo) = vbYes Then
Shell "explorer.exe " & "http://www.winrar.es/descargas", vbNormalFocus
End
Else
End
End If
End If
If Not LblWinRAR.Caption = "" Then
If Not CBool(PathFileExists(LblWinRAR.Caption & "\rarreg.key")) _
And Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
If CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
MsgBox "¡¡ GRACIAS POR REGISTRAR WINRAR !!" & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
End If
End If
If CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
Kill LblWinRAR.Caption & "\rarreg.key"
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
If reg = "Indetectables WinRAR License®" Then
MsgBox "ACERCA DE LA LICENCIA WINRAR." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
Else
If MsgBox("Su versión de WinRAR es una versión Registrada." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & "¿ Desea reemplazar la Licencia actual ?", vbQuestion + vbYesNo) = vbYes Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
1 If Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
LblEspera = "espera"
GoTo 1
Else
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
Kill LblWinRAR.Caption & "\rarreg.key"
MsgBox "NUEVA LICENCIA WINRAR." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
Else
End
End If
End If
End If
If CBool(PathFileExists(LblWinRAR.Caption & "\rarreg.key")) Then
Open LblWinRAR.Caption & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open LblWinRAR.Caption & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
If reg = "Indetectables WinRAR License®" Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
Kill LblWinRAR.Caption & "\rarreg.key"
MsgBox "ACERCA DE LA LICENCIA WINRAR." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
Else
If MsgBox("Su versión de WinRAR es una versión Registrada." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & "¿ Desea reemplazar la Licencia actual ?", vbQuestion + vbYesNo) = vbYes Then
Kill LblWinRAR.Caption & "\rarreg.key"
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
2 If Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
LblEspera = "espera"
GoTo 2
Else
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
MsgBox "NUEVA LICENCIA WINRAR." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
Else
End
End If
End If
End If
End Sub
Private Sub Timer2_Timer()
Me.Hide
If Not App.EXEName = "Indetectabes WinRAR License®" Then End
On Error Resume Next
Dim key As Integer, reg As String, reg2 As String, lic As VbMsgBoxStyle
Dim sEquipo As String * 255
GetComputerName sEquipo, 255
Dim MiObjeto As Object
Set MiObjeto = CreateObject("Wscript.Shell")
LblWinRAR.Caption = MiObjeto.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe\Path") & "\"
Set MiObjeto = Nothing
If LblWinRAR.Caption = "" Then
If MsgBox("WinRAR is not installed on your computer." & vbCrLf & vbCrLf & "¿ Do you want to go to the official download center ?", vbQuestion + vbYesNo) = vbYes Then
Shell "explorer.exe " & "http://www.rarlab.com/", vbNormalFocus
End
Else
End
End If
End If
If Not LblWinRAR.Caption = "" Then
If Not CBool(PathFileExists(LblWinRAR.Caption & "\rarreg.key")) _
And Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
If CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
MsgBox "¡¡ THANK YOU FOR REGISTERING WINRAR !!" & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
End If
End If
If CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
Kill LblWinRAR.Caption & "\rarreg.key"
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
If reg = "Indetectables WinRAR License®" Then
MsgBox "ABOUT WINRAR LICENSE." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registered to" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
Else
If MsgBox("His version of WinRAR is a Registered version." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registered to" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & "¿ Want to replace the current License ?", vbQuestion + vbYesNo) = vbYes Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
1 If Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
LblEspera = "espera"
GoTo 1
Else
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
Kill LblWinRAR.Caption & "\rarreg.key"
MsgBox "NEW WINRAR LICENSE." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registrado por" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
Else
End
End If
End If
End If
If CBool(PathFileExists(LblWinRAR.Caption & "\rarreg.key")) Then
Open LblWinRAR.Caption & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open LblWinRAR.Caption & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
If reg = "Indetectables WinRAR License®" Then
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
Kill LblWinRAR.Caption & "\rarreg.key"
MsgBox "ABOUT WINRAR LICENSE." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registered to" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
Else
If MsgBox("His version of WinRAR is a Registered version." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registered to" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & "¿ Want to replace the current License ?", vbQuestion + vbYesNo) = vbYes Then
Kill LblWinRAR.Caption & "\rarreg.key"
key = FreeFile
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Output As key
Print #key, "RAR registration data"
Print #key, "Indetectables WinRAR License®"
Print #key, "Licencia Ilimitada"
Print #key, "UID=a359ff6c5e68b46436cd"
Print #key, "641221225036cdc7aa3c6bfb616d0b30cc093e0c012dd1e6bb194a"
Print #key, "7ba749b30c3671a8be6c6026300621e313c51e8b0bedb2ec8e76f9"
Print #key, "3749732afc06bb82e434c51c81ead8c32603eefc08866b0a4e1635"
Print #key, "2ef41b8e3912f3f0d5edfb2b50612b071a6035432e15402c924e1f"
Print #key, "a818ad98bb2bc51271c510f519df9e83b42e61ec54f98ecb6b9da6"
Print #key, "37bba08c78b6caa68135f1f06afb966751cf8d3abbf8789860469d"
Print #key, "1302bac47aaf2fe3d0d65524d1d60062ef60c41638712963450040"
Close key
2 If Not CBool(PathFileExists(Environ("AppData") & "\WinRAR" & "\rarreg.key")) Then
LblEspera = "espera"
GoTo 2
Else
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 2
Line Input #1, reg
Next lic
Close #1
Open Environ("AppData") & "\WinRAR" & "\rarreg.key" For Input As #1
For lic = 1 To 3
Line Input #1, reg2
Next lic
Close #1
MsgBox "NEW WINRAR LICENSE." & vbCrLf & vbCrLf & "________________________________________" _
& vbCrLf & vbCrLf & "Registered to" & vbCrLf & reg & vbCrLf & vbCrLf & reg2 & vbCrLf & _
"________________________________________" & vbCrLf & vbCrLf & sEquipo, vbInformation
End
End If
Else
End
End If
End If
End If
End Sub