vbscript - Can't query windows 7 registry remotely using WMI -


i used following vb script query registry value remotely using wmi. able connect, couldn't value.

option explicit  dim strcomputer dim struser, strpassword dim objswbemlocator, objswbemservices, objreg dim strkeypath, strentryname, strvalue  const hkey_local_machine = &h80000002  strcomputer = "192.168.1.10"  struser = "username" strpassword = "password"  set objswbemlocator = createobject("wbemscripting.swbemlocator") set objswbemservices = objswbemlocator.connectserver _ (strcomputer, "root\default", struser, strpassword)  set objreg = objswbemservices.get("stdregprov")  strkeypath = "system\currentcontrolset\services\eventlog\application" strentryname = "maxsize" objreg.getdwordvalue hkey_local_machine, strkeypath, strentryname, dwvalue wscript.echo dwvalue 

it returns: microsoft vbscript runtime error: variable undefined: 'dwvalue'. means didn't value target machine. checked on target machine, dword value exist.

i configured target machine follows

  1. turned off firewall
  2. run "wmimgmt.msc" -> wmi control -> properties enabled "remote enable" namespaces , sub namespaces users.
  3. started service "remote registry"

i spent days on problem , couldn't figure out. please me check whether script has problem or it's configuration of target machine. thank much.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -