Some more info:

The script that change the IP settings is run after logon from a run key in HKLM
It only operates on values in HKLM

Jens,
Writes to the registry is immediated: Yes, but i belive that my problems comes from all diskbufferes are not written to disk before ore during shutdown.

Les,
DHCP is not an option, because i’m actually changing the IP settings on the clients to use DHCP, they have been using fixed adresses until now.
(What came first the hen or the egg [Wink] )
I have tryed to pause the script for 30 seconds. I even tried shelling out to import a dummy .reg file
using regedit before doing the restart

Jack,
Same restart procedure, and same script on all clients. You are surely right in something is wrong on the setup on the clients. The restart could be the problem, i wil dig into this, it is done by an external program.

I know that all my writes to the registry are lost, because the script starts with reading/writing to a private key/value to decide if it has to be run, if the value exists the script won’t run again, this value is also not saved!
The puzzle is that this only happens on about 1 out of 10 Win9x clients.

My last desparate though is to let the the script make a small install of a program, like the windows installer, even if it is installed before. But why bother the 9 out of 10 clients that works with no problems?

What i would really like to do is to flush all disk buffers before i execute the restart command.

-Erik