Fixlet to change IP address does not work as expected on some PCs

I have a fixlet that among other things sets the static IP address for workstations that then get shipped to our remote offices (no DHCP there). It works fine on most Windows 10 computers but there are some where it does not run correctly. When I run the exact same command manually on the system using psexec it sets the IP address correctly. IPs obfuscated to protect the innocent:

if {exists (operating system) whose (it as string as lowercase contains “Win10” as lowercase)}
dos netsh interface ip set address name=“Ethernet” static “{key “ip” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” “255.255.255.0” “{key “gateway” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” "0"
dos netsh interface ip set dns name=“Ethernet” static "0.0.0.0"
dos netsh interface ip add dns name=“Ethernet” addr="0.0.0.0"
else
dos netsh interface ip set address name=“Local Area Connection” static “{key “ip” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” “255.255.255.0” “{key “gateway” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” "0"
dos netsh interface ip set dns name=“Local Area Connection” static "0.0.0.0"
dos netsh interface ip add dns name=“Local Area Connection” addr="0.0.0.0"
endif

I fixed my own problem by providing the full path to the netsh command:

dos C:\Windows\System32\netsh.exe

This is a 64-bit system which has the command in both 32-bit and 64-bit locations so I am unsure why it wouldn’t work using the 32-bit command. Previously I had attempted this with the 32-bit path and it also did not work. I hadn’t thought about providing the 64-bit path until now.

I’m suprised using the full path actually got to the 64-bit netsh anyway. Normally referencing “c:\windows\system” would have also been redirected.

I would’ve suggested adding
action uses wow64 redirection false
to your script, somewhere before calling the executables.