Thursday, August 23, 2007

Get Registry Data of Client's machin

Hi Friends,
It is very easy to get server's information from asp page, by using server variables but it is big task to read client's information from web page.

Scenario : Client wants to save records of all user's system (configuration e.g. processor,memory etc), who opened your site in there pc or laptop.

Solution : Create object of Wscript.Shell and read registry with Key name
Code :
Public Function ReadRegistry()
Dim ComputerName
Dim What
response.write "read"
'get computer name
ComputerName = wsho.RegRead"HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName")
If ComputerName = "WINME" Then
What = mes
End If
If ComputerName = "WINXP" Then
What = mas
End If
response.write "computer name is " & ComputerName
End Function

This code will print only computer name, same way you can read all information of Registry from client's machine.

Cheers !!!!!

No comments: