Change the TCP/IP advance settings

(imported topic written by emock91)

Does anyone have a Fixlet to change this property in Windows XP ? “Use this connection’s DNS suffix in DNS registration”

Thanks

(imported comment written by gjeremia91)

You can apply this globally by setting:

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

" “RegistrationEnabled”=DWORD:00000000

(imported comment written by gjeremia91)

You can also apply it to specific interfaces. This example will set it for the interface named “Wireless Network Connection” (Action:)

action parameter query 
"regenabledonoff" with description 
"Enable or Disable DNS Adapter Registration? (0=0ff, 1=On" with 

default 
"0"   delete __appendfile delete dns.reg appendfile Windows Registry Editor Version 5.00 appendfile appendfile 
{(
"[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\" & it & "]%0d%0a%22RegistrationEnabled%22=DWORD:0000000
" & parameter "regenabledonoff
" & "%0a%0d%0a%0d
") of (names of keys whose (exists keys "connection
" whose (value "name
" of it as string = "Wireless Network Connection
") of it) of keys of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\
" of registry)} move __appendfile dns.reg waithidden 
"{pathname of windows folder}\regedit.exe" /s 
"{pathname of current site}\dns.reg"

(imported comment written by gjeremia91)

My bad, I gave the info for turning on/off the register DNS. If I get a few secs I’ll look a the other setting.

(imported comment written by gjeremia91)

Ok, same keys, different value (RegisterAdapterName):

// Get Input
action parameter query “regadaptonoff” with description “Register Suffix ? (0=No, 1=Yes)” with default "0"
action parameter query “adaptername” with description “Adapter Name (case insensetive)” with default “Local Area Connection”

// Check the Input
continue if {exists parameter “regaqdaptonoff” as integer and parameter “regadaptonoff” as integer < 2 and parameter “regadaptonoff” as integer >=0}

// Build the registry file
delete __appendfile
delete dns.reg
appendfile Windows Registry Editor Version 5.00
appendfile
appendfile {("%0d%0a%22RegisterAdapterName%22=DWORD:0000000" & parameter “regadaptonoff” & “%0a%0d%0a%0d”) of (names of keys whose (exists keys “connection” whose (value “name” of it as string as lowercase contains %22" & parameter adaptername & “%22”) of it) of keys of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network” of registry)}
move __appendfile dns.reg

// Update the registry
waithidden “{pathname of windows folder}\regedit.exe” /s “{pathname of current site}\dns.reg”

just creates a registry file with the key and value=data settings of keys that match “adaptername” and sets the data value to dword:0000000 (00000001 or 00000000)

(imported comment written by nagaraj.s)

hi

can you help me

how to confugure ip change alerts

(imported comment written by emock91)

Thank you … is there a way to wild card the reg keys ? there are always 3 different keys in that Hive .

(imported comment written by emock91)

Thank you for your help, I see that it gives you the option to set the reg key to 0 or 1. But the action fails ,

(imported comment written by gjeremia91)

which option did you take? The regset or the regedit ?

can you provide the client log entry showing the failure it’s probably a typo on my side :slight_smile:

(imported comment written by emock91)

Completed // Get Input

Completed action parameter query “regadaptonoff” with description “Register Suffix ? (0=No, 1=Yes)” with default “0”

Completed action parameter query “adaptername” with description “Adapter Name (case insensetive)” with default “Local Area Connection”

Completed // Check the Input

Failed continue if {exists parameter “regaqdaptonoff” as integer and parameter “regadaptonoff” as integer < 2 and parameter “regadaptonoff” as integer >=0}

// Build the registry file

delete __appendfile

delete dns.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile {("%0d%0a%22RegisterAdapterName%22=DWORD:0000000" & parameter “regadaptonoff” & “%0a%0d%0a%0d”) of (names of keys whose (exists keys “connection” whose (value “name” of it as string as lowercase contains %22" & parameter adaptername & “%22”) of it) of keys of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network” of registry)}

move __appendfile dns.reg

// Update the registry

waithidden “{pathname of windows folder}\regedit.exe” /s “{pathname of current site}\dns.reg”

(imported comment written by emock91)

Here is the log for the failure. Thank you

At 08:58:52 -0500 - actionsite (http://acbes.albanycounty.com:52311/cgi-bin/bfgather.exe/actionsite)

Command succeeded action parameter query “regadaptonoff” with description “Register Suffix ? (0=No, 1=Yes)” with default “0” (fixlet 77383)

Command succeeded action parameter query “adaptername” with description “Adapter Name (case insensetive)” with default “Local Area Connection” (fixlet 77383)

Command failed (Relevance substitution failed) continue if {exists parameter “regaqdaptonoff” as integer and parameter “regadaptonoff” as integer < 2 and parameter “regadaptonoff” as integer >=0} (fixlet 77383)

At 08:58:52 -0500 -

(imported comment written by gjeremia91)

there is a typo in the continue if statement. “regaqdaptonoff” should be “regadaptonoff” (also updated to include the lack of “of action” as pointed out by jesse below. I have confirmed that it is

NOT

necessary, but it does make it more complete.)

there was also a typo in another area. I appologize, I didn’t have time to test the code:

here’s an update:

// Get Input
action parameter query “regadaptonoff” with description “Register Suffix ? (0=No, 1=Yes)” with default "0"
action parameter query “adaptername” with description “Adapter Name (case insensetive)” with default “Local Area Connection”

// Check the Input
continue if {(exists it as integer and ((it = 0 or it = 1) of (it as integer))) of parameter “regadaptonoff” of action}

// Build the registry file
delete __appendfile
delete dns.reg
appendfile Windows Registry Editor Version 5.00
appendfile
appendfile {("%0d%0a%22RegisterAdapterName%22=DWORD:0000000" & parameter “regadaptonoff” of action & “%0a%0d%0a%0d”) of (names of keys whose (exists keys “connection” whose (value “name” of it as string as lowercase contains ((parameter “adaptername” of action )as string)) of it) of keys of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network” of registry)}
move __appendfile dns.reg

// Update the registry
waithidden “{pathname of windows folder}\regedit.exe” /s “{pathname of current site}\dns.reg”

(imported comment written by jessewk)

Try this for the continue if line:

continue if {exists parameter “regaqdaptonoff” whose (exists it as integer AND it as integer = 1) of action}

The key is that you were missing ‘of action’ but I also cleaned up the expression a little.

Jesse

(imported comment written by emock91)

At 09:49:17 -0500 - actionsite (http://acbes.albanycounty.com:52311/cgi-bin/bfgather.exe/actionsite)

Command succeeded action parameter query “regadaptonoff” with description “Register Suffix ? (0=No, 1=Yes)” with default “0” (fixlet 77424)

Command succeeded action parameter query “adaptername” with description “Adapter Name (case insensetive)” with default “Local Area Connection” (fixlet 77424)

Command succeeded (evaluated true) continue if {(exists it as integer and ((it = 0 or it = 1) of (it as integer))) of parameter “regadaptonoff” of action} (fixlet 77424)

Command succeeded delete __appendfile (fixlet 77424)

Command failed (File not found) delete dns.reg (fixlet 77424)

Command succeeded appendfile Windows Registry Editor Version 5.00 (fixlet 77424)

Command succeeded (file created) appendfile Windows Registry Editor Version 5.00 (fixlet 77424)

Command succeeded appendfile Windows Registry Editor Version 5.00 (fixlet 77424)

Command succeeded appendfile (fixlet 77424)

Command succeeded appendfile (fixlet 77424)

Command succeeded move __appendfile dns.reg (fixlet 77424)

Command failed (Relevance substitution failed) waithidden “{pathname of windows folder}\regedit.exe” /s “{pathname of current site}\dns.reg” (fixlet 77424)

(imported comment written by emock91)

Hey there , it seems to fail at the last part

waithidden “{pathname of windows folder}\regedit.exe” /s “{pathname of current site}\dns.reg”

Thanks

(imported comment written by jessewk)

“pathname of current site” should be “pathname of client folder of current site”

(imported comment written by gjeremia91)

another silly mistake. I’m writing blind because I’m re-building my test install of BigFix, making testing of whatever I write a little more difficult.