View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
[email protected] newsgroups.jd@gmail.com is offline
external usenet poster
 
Posts: 7
Default Accessing Remote registry in Excel

On Aug 6, 8:54*am, wrote:
Thanks


I got a VBS script to work pulling remote registry data - could you
guys help me now figure ut how to put this into excel please??


-- code --


On Error Resume Next

Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "remoteServer"
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root
\default:StdRegProv")
strKeyPath = "SOFTWARE\AssetInfo"

AssetTag = "AssetTag"
SerialNumber = "SerialNumber"

objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, AssetTag,
strValue1
objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath,
SerialNumber, strValue2

Wscript.Echo strValue1
Wscript.Echo strValue2


-- code --

Now I jsut need it to pull the strComputer from like excel cell A2 and
then instead of echo put the value in B2 and so on...

Thanks in advance.


JD