Ive just finished setting up a basic script to shutdown the depts Pc's but for some reason the shutdown isnt returning an error code :

code:
Shutdown ("$computer","Tuff Its Shuting Down",60, 1, 1)
If @ERROR = 0
WriteLine(2, "Shutdown did execute on $computer"=Chr(13)+Chr(10))
Else
WriteLine(2, "# @serror, Shutdown did not execute on $computer"=Chr(13)+Chr(10))

Anyone ideas where im going wrong ?
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields