Autor
|
Tema: (ayuda) product key de windows (Leído 15,118 veces)
|
guidosl
Desconectado
Mensajes: 75
|
queria agregar a un programita q estoy haciendo
un textbox en donde al apretar un boton me muestre la clave del windows xp y vista
segun lo q creo es leyendo esta clave
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents] "OOBETimer"=hex:fe,e5,71,d6,8b,6a,8d,6f,d5,33,93,jd
pero no se como pasar ese numero hexa a letras...porque al hacerlo me muestra signos como:
Ö ÿ
gracias
|
|
« Última modificación: 6 Abril 2009, 14:23 pm por guidosl »
|
En línea
|
|
|
|
|
guidosl
Desconectado
Mensajes: 75
|
yo uso esto para leer claves en el registro
Private Sub painicio() 'lee el registro y carga la paginad e inicio de IE Dim objShell As Object Set objShell = CreateObject("Wscript.Shell")
Text2.Text = objShell.RegRead("HKCU\SOFTWARE\Microsoft\Internet Explorer\Main\Start Page") Set objShell = Nothing End Sub
esta me lee la pagina de inico de internet explorer y la muestra en un text2.txt
como lo podria ahcer con esto?¿
|
|
|
En línea
|
|
|
|
xkiz ™
|
yo te diria que es mejor hacerlo con API, usa el ejemplo que te pase ahi, solo tenes que agregar esta constante a ese code
Private Const HKEY_LOCAL_MACHINE As Long = &H80000002
|
|
|
En línea
|
|
|
|
guidosl
Desconectado
Mensajes: 75
|
gracias! pero me gustaria algo mas simple si se puede
es q hace poco empese a programar
asi q si a alguien se le ocurre algo ....
de nuevo gracias
|
|
|
En línea
|
|
|
|
xkiz ™
|
usando api ovbias el tener que usar referencia a Script Hostejemplo del API-Guide: Const REG_SZ = 1 ' Unicode nul terminated string Const REG_BINARY = 3 ' Free form binary Private Const HKEY_LOCAL_MACHINE As Long = &H80000002 Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long Function RegQueryStringValue(ByVal hKey As Long, ByVal strValueName As String) As String Dim lResult As Long, lValueType As Long, strBuf As String, lDataBufSize As Long 'retrieve nformation about the key lResult = RegQueryValueEx(hKey, strValueName, 0, lValueType, ByVal 0, lDataBufSize) If lResult = 0 Then If lValueType = REG_SZ Then 'Create a buffer strBuf = String(lDataBufSize, Chr$(0)) 'retrieve the key's content lResult = RegQueryValueEx(hKey, strValueName, 0, 0, ByVal strBuf, lDataBufSize) If lResult = 0 Then 'Remove the unnecessary chr$(0)'s RegQueryStringValue = Left$(strBuf, InStr(1, strBuf, Chr$(0)) - 1) End If ElseIf lValueType = REG_BINARY Then Dim strData As Integer 'retrieve the key's value lResult = RegQueryValueEx(hKey, strValueName, 0, 0, strData, lDataBufSize) If lResult = 0 Then RegQueryStringValue = strData End If End If End If End Function Function GetString(hKey As Long, strPath As String, strValue As String) Dim Ret 'Open the key RegOpenKey hKey, strPath, Ret 'Get the key's content GetString = RegQueryStringValue(Ret, strValue) 'Close the key RegCloseKey Ret End Function Private Sub Form_Load() 'KPD-Team 1998 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net Ret = GetString(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents", "OOBETimer") If Ret = "" Then MsgBox "No value found !", vbExclamation + vbOKOnly, App.Title: Exit Sub MsgBox "The value is " + Ret, vbOKOnly + vbInformation, App.Title End Sub
aca te pongo un módulo clase para manipular el registro muy completo: Lightning! Registry
|
|
« Última modificación: 6 Abril 2009, 11:13 am por xkiz »
|
En línea
|
|
|
|
guidosl
Desconectado
Mensajes: 75
|
claro es parecido a lo q probe recien yo con la info q me diste
pero me develve un valo numerico
no es a lo q me referia...yo queria q me de la clave de windows
ej: jtsnf-aset3-gf5gy-4fswf-fe234
se entiende?
se puede hacer?
|
|
|
En línea
|
|
|
|
xkiz ™
|
es que el serial de Windows no esta en esa clave
|
|
|
En línea
|
|
|
|
guidosl
Desconectado
Mensajes: 75
|
mmm me parece q no nos entedimos
si ahi esta el serial de windows graurdado como dato en esa clave de registro
pero esta guardado en HEXADECIMAL
yo lo se pasar a ascii manualmente pero no desde VB
eso es lo q necesito
ej: que le programa te tire un msjbox "su clave actual es jtsnf-aset3-gf5gy-4fswf-fe234"
gracias igual por tu ayuda
|
|
|
En línea
|
|
|
|
xkiz ™
|
si ya se, hice un programa para cambiar el serial de XP, y se que en esa clave no esta el serial de XP, esa clave OOBETimer se usa para otra cosa. solo que no se si puedo poner el codigo aca. busca en Planet Source code que hay vas a encontrar lo que buscas
|
|
|
En línea
|
|
|
|
|
|