Jump to content

Recommended Posts

$start = 1
while 1
   $enum = regenumkey("HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities", $start)
   if @error then exitloop
   $start = $start + 1
   msgbox(0,"",$enum)
wend

Edited by this-is-me
Who else would I be?
Link to post
Share on other sites

$start = 1
while 1
   $enum = regenumkey("HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities", $start)
   if @error then exitloop
   $start = $start + 1
   msgbox(0,"",$enum)
wend

<{POST_SNAPBACK}>

It work with regenumval:

while 1
   $enum = regenumval("HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities", $start)
   if @error then exitloop
   $start = $start + 1
   msgbox(0,"",$enum)
wend

With Windows NT 4 don't work , even if the key exists does not find it , using the utility reg.exe find it.

With windows 2000 and windows 2003 it's OK.

Thanks

Edited by Larry
Link to post
Share on other sites

It work with regenumval:

while 1
   $enum = regenumval("HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities", $start)
   if @error then exitloop
   $start = $start + 1
   msgbox(0,"",$enum)
wend

With  Windows NT 4 don't work , even if the key exists does not find it , using the utility reg.exe find it.

With windows 2000 and windows 2003 it's OK.

Thanks

<{POST_SNAPBACK}>

@Jon

Is it a bug of regenumval if in Windows Nt don' t work ?

Link to post
Share on other sites

I'l have to check, should work fine though.

<{POST_SNAPBACK}>

In this exsample with windows nt 4 work fine :

Computer "pluto" and "paperino" same domain NT

From PC Pluto or viceversa

$var1=RegEnumVal("\\paperino\HKL_M\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities",2)

return valid istance.

In this example with windows nt 4 don't work :

Computer "pluto" and "paperino" different domain NT but with trust (user with valid permission)

$var1 = RegEnumVal("\\paperino\HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities",2)

value returned : $var1 = ""

N.B. if i use Regread i can read di value under "ValidCommunities" with the same username .

This same situation with windows 2000, 2003 or XP work fine.

Regards

Link to post
Share on other sites

I didn't know you could read/write from/to remote registries with AutoIt.

Edit:

A registry key must start with "HKEY_LOCAL_MACHINE" ("HKLM") or "HKEY_USERS" ("HKU") or "HKEY_CURRENT_USER" ("HKCU") or "HKEY_CLASSES_ROOT" ("HKCR") or "HKEY_CURRENT_CONFIG" ("HKCC").

Edited by SlimShady
Link to post
Share on other sites
  • Developers

I didn't know you could read/write from/to remote registries with AutoIt.

Edit:

<{POST_SNAPBACK}>

Here is the total remarks section from the helpfile... look at the bottom of it...:

Remarks

A registry key must start with "HKEY_LOCAL_MACHINE" ("HKLM") or "HKEY_USERS" ("HKU") or "HKEY_CURRENT_USER" ("HKCU") or "HKEY_CLASSES_ROOT" ("HKCR") or "HKEY_CURRENT_CONFIG" ("HKCC").

AutoIt supports registry keys of type REG_BINARY, REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ, and REG_DWORD.

To access the (Default) value use "" (a blank string) for the valuename.

When reading a REG_BINARY key the result is a string of hex characters, e.g. the REG_BINARY value of 01,a9,ff,77 will be read as the string "01A9FF77".

When reading a REG_MULTI_SZ key the multiple entries are seperated by @LF - use with StringSplit(..., @LF) to get each entry.

It is possible to access remote registries by using a keyname in the form "\\computername\keyname". To use this feature you must have the correct access rights on NT/2000/XP/2003, or if you are using a 9x based OS the remote PC must have the remote regsitry service installed first (See Microsoft Knowledge Base Article - 141460).

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

I didn't know you could read/write from/to remote registries with AutoIt.

Edit:

<{POST_SNAPBACK}>

When i Read the remote registry of a Computer with windows NT 4 with RegEnumVal

from a computer with Windows Nt/Win2k/xp/w2k3 in different domain with trust,

don't read the correct istance (null string).

If ,same condition, the remote computer has W2k/xp/w2k3 it work fine (read the correct

istance).

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...