I'm trying to echo the computer name in a browser window/html document either from a registry key (HKLM\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\ComputerName) or an environment variable (COMPUTERNAME). This will end up being part of the wallpaper of an active-desktop enabled PC and so the script will be running in the Intranet zone. I am very new to VB and VBScript and don't have a firm grasp of what is and is not allowed within a browser window. I have tried several bits of code and below are the last two that I've tried though neither actually echo any text in the browser. Any assistance would be greatly appreciated.
<Script Language="vbscript">
Dim WshSHell
Set WshShell = Wscript.CreateObject("Wscript.Shell"
WScript.Echo WshShell.RegRead("HKLM\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\ComputerName"
</Script>
<Script Language="vbscript">
Dim WshSHell
Set WshShell = Wscript.CreateObject("Wscript.Shell"
WScript.Echo WSHShell.Environment.item("computername"
</Script>
<Script Language="vbscript">
Dim WshSHell
Set WshShell = Wscript.CreateObject("Wscript.Shell"
WScript.Echo WshShell.RegRead("HKLM\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName\ComputerName"
</Script>
<Script Language="vbscript">
Dim WshSHell
Set WshShell = Wscript.CreateObject("Wscript.Shell"
WScript.Echo WSHShell.Environment.item("computername"
</Script>