Jump to content

Shadster

Members
  • Posts

    3
  • Joined

  • Last visited

Shadster's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. ahh... so clean and elegant. thank you so much! mine was close but starting to get 'ugly!!' thanks for giving me a good clean example... happy holidays!
  2. yeah, they are for each nic connection... so i have it reading them, and kicking it to a msg box, and some tenative logic below... but obviously i have some errors when i go to pass it to a the value, and then read the key if a 0 or 1... as well as catching the error if that sub-key (NetbiosOptions) does not exist $Path = String("HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetBTParametersInterfaces") For $i= 1 to 10 $var = RegEnumKey($Path, $i) If @error <> 0 then ExitLoop MsgBox(4096, "Tcpip_{xxx} #" & $i & " under HKLMSYSTEMCurrentControlSetServicesNetBTParametersInterfaces: ", $var) also not sure on if i need the backtrailing slash for the RegEnumVal: something like this to get that value (then determine if a 0 --change it, else next) but keeps showing blank so not setting/reading it yet... maybe a missing blackslash i.e. $Path''&$var $val = RegEnumVal($Path1&$var, "NetbiosOptions") MsgBox(4096, "testwindows", $val)
  3. Hi All, Trying to change a couple regkeys in which the full key name is dynamic from build to build and i am not sure how to really parse it. need to change the dword value of "NetbiosOption" to "1" if it exists under this tree: HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\Tcpip_{xyz123-12-345-7890} problem is that the guid... part inside of the curly brackets changes... {xyz123-12-345-7890} from machine to machine with same hardware/image etc...) so how can i just look for "Tcpip_{* or wildcard equivalent in this branch and then edit it if it is there? or should i just change my logic and search the reg for the NetbiosOption key and if exists change it to 1? not sure i like the blanket approach since i know that i only want to change the ones under this 'branch' or should I have it read and set then return values to a variable(s) and then pump it back via something like:" RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces\$Variable", "NetbiosOption","Reg_DWORD", "1" )
×
×
  • Create New...