I found one problem. The script executes the uptime command then Code:
 If Open(3,"C:\uptime.txt") = 0
$x = ReadLine(3)
$day = Val(SubStr("$x",InStr("$x","uptime") + 8,3))
EndIf


opens the uptime.txt file and read the data after "uptime" and write the value to the ini file and its not writing anything excepte 0.. With the origional version of this script the uptime.txt was only one line long. Is there something I need to be doing differently for my uptime.txt file that is multiple lines long? The data I am looking for in the file is aboout 15 lines down.