Recuperer clée de registre dans page web

pascal59200 Messages postés 13 Date d'inscription samedi 4 mai 2002 Statut Membre Dernière intervention 10 mai 2005 - 25 déc. 2002 à 22:39
pascal59200 Messages postés 13 Date d'inscription samedi 4 mai 2002 Statut Membre Dernière intervention 10 mai 2005 - 26 déc. 2002 à 02:10
Salut tout le monde,

Je voudrai recuperer dans une page web des infos de mon registre. Serait-il possible en VB ou autre et comment faire?

Merci

bye

2 réponses

TheSaib Messages postés 2367 Date d'inscription mardi 17 avril 2001 Statut Membre Dernière intervention 26 décembre 2007 23
26 déc. 2002 à 00:48
en VBscript :

Avec WMI voici un exemple:

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
msgbox subkey
Next

SANS WMI :

Dim WshShell, retArray, i
Set WshShell = WScript.CreateObject("WScript.Shell")
retArray = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
for i = 0 to ubound(retArray)-1
'Ce que tu veux faire
next

P.S : Ce n'est pas légal de lire une base de registre qui n'est pas la tienne !

::|The S@ib|::
0
pascal59200 Messages postés 13 Date d'inscription samedi 4 mai 2002 Statut Membre Dernière intervention 10 mai 2005
26 déc. 2002 à 02:10
sniffff snifffff snifff :dissapprove) Merci kan meme de l'aide, mais j'y arrive toujours pas.

j'ai essaye pour mettre la valeur dans un formulaire en HTML :

<HTML>

<SCRIPT Language="VBScript">
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
msgbox subkey
Next

</SCRIPT>

</HTML>

Mais je sais pas le kel nom il faut donner a la zone de texte et si c'est bon.

Merci de m'aider

Bye
0
Rejoignez-nous