I created a self updating application that has a bunch of other random code in it. It's a compiled script that only keeps getting bigger and bigger. I have ran into two instances where I have made a mistake and I have caused the application to crash twice. I have about 600 machines that I'd eventually have this compiled script running on and mistakes are bound to occur, thus crashing the app on 600 machines just seems like a disaster. I think my mistake is that I tried to keep it simple by just having all the code in one compiled script and placed it in the start-up directory in windows so that I could ensure my code would remain running after a reboot etc...I thought that it'd be a good idea to just have the self updating function running the entire time since this doesn't change much so it won't crash on me and have the portion of the code that changes a lot on a separate exe. Is there another approach I could take? I was wondering if anyone has done this before and wanted to see if anyone would like to share some thoughts and or ideas with me.
While 1
Sleep(Rand(60000, 120000, 1)) ;Don't want to boggle the CPU sleeping between 60 to 120 seconds
_SelfUpdate()
;I want to check for updates on an interval and the only way I can keep my application running is in a while loop like this one
$ExperimentalAppThatCrashesAlot = "Path\path\appname.exe"
Run($ExperimentalAppThatCrashesAlot, "Path\path", @SW_HIDE)
WEnd
Func _SelfUpdate()
......
EndFunc
Thanks to the forums, AutoIT and to people reading this post.
While 1
Sleep(Rand(60000, 120000, 1)) ;Don't want to boggle the CPU sleeping between 60 to 120 seconds
_SelfUpdate()
;I want to check for updates on an interval and the only way I can keep my application running is in a while loop like this one
$ExperimentalAppThatCrashesAlot = "Path\path\appname.exe"
Run($ExperimentalAppThatCrashesAlot, "Path\path", @SW_HIDE)
WEnd
Func _SelfUpdate()
......
EndFunc
Thanks to the forums, AutoIT and to people reading this post.