Want to change active network interfaces to MTU size of 1278
Relevance:
q: exists keys (names of adapters whose (exists gateway of it) of network) whose (not exists value “mtu” whose (it != “1278”) of it ) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry
Acton script
regset “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{names of keys (names of adapters whose (exists gateway of it) of network) whose (not exists value “mtu” whose (it != “1278”) of it ) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry}” “mtu”=dword:000004fe
What issue are you having? It looks to me like your action won’t take into accout multiple results and the syntax isn’t quite right…
Try this:
createfile until __END
Windows Registry Editor Version 5.00
{concatenation “%0d%0a” of (("%22%22 %22mtu%22=dword:000004fe") of names of keys (names of adapters whose (exists gateway of it) of network) whose (not exists value “mtu” whose (it != “1278”) of it ) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry }
__END
Ben missed a parenthesis in the relevance clause. Try this:
createfile until __END
Windows Registry Editor Version 5.00
{concatenation “%0d%0a” of (("%22%22 %22mtu%22=dword:000004fe") of names of keys (names of adapters whose (exists gateway of it) of network) whose (not exists value “mtu” whose (it != “1278”) of it ) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry) }
When I run the relevance query on my machine using the relevance debugger, I get the following:
Q: concatenation “%0d%0a” of (("%22%22 %22mtu%22=dword:000004fe") of names of keys (names of adapters whose (exists gateway of it) of network) whose (not exists value “mtu” whose (it != “1278”) of it ) of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry)