Francesco Posted August 24, 2007 Posted August 24, 2007 (edited) I have a few problems with %reboot%, for some weird reasons "shutdown.exe -r -f -t" is invoked without the time (0)I saw this in the core.js file that probably is the cause rs = rs.replace(/%reboot%/gi, 'shutdown.exe -r -f -t '); // force a reboot after X seconds rs = rs.replace(/%reboot%/gi, 'shutdown.exe -r -f -t 0'); // force a reboot nowthere are those 2 replaces one after another but the reboot time isn't specified for the 1° one causing the reboot to fail (the time parameter is mandatory). Edited August 24, 2007 by Francesco
Francesco Posted January 7, 2008 Author Posted January 7, 2008 I still have the same problem with the latest WPI version 6.3. Any idea?
Francesco Posted January 7, 2008 Author Posted January 7, 2008 (edited) Let me try some stuff.If you remove the first of those 2 lines the reboot command ("%reboot%" with no other parameters) works fine. I think all you have to do is add an IF block that checks if there's a number after the %reboot% command and then use the first or second replace accordingly. Edited January 7, 2008 by Francesco
Francesco Posted April 27, 2008 Author Posted April 27, 2008 Any news about a fix for this bug? I still see it on the latest WPI 6.4
mritter Posted April 28, 2008 Posted April 28, 2008 The two checks are very similar, but the frirst one looks for a space after %reboot% while the second does not. So, if you do%reboot% 5It will wait 5 seconds before restarting. If you do not specify a number it assumes 0 and shuts down immediately.
Francesco Posted April 28, 2008 Author Posted April 28, 2008 The two checks are very similar, but the frirst one looks for a space after %reboot% while the second does not. So, if you do%reboot% 5It will wait 5 seconds before restarting. If you do not specify a number it assumes 0 and shuts down immediately.I use only %reboot% and it doesn't reboot unless I remove the first of those 2 lines from the core.js or I specify the seconds.The two lines in the core.js are one immediately next the other so if you don't specify a reboot time the reboot command call will be "shutdown.exe -r -f -t " that won't never work, because -t has no time value. No one of those 2 replaces is looking for a space, they both look for the same identical string.
mritter Posted April 28, 2008 Posted April 28, 2008 Weird. Somehow, sometime, the space was removed. There should be a space in the first check: rs = rs.replace(/%reboot% /gi, 'shutdown.exe -r -f -t '); // force a reboot after X secondsPut a space after the %reboot%.See the second line where the replace puts a 0 after the -t? In the first one it leaves your specified time there.Kel: Put this in the latest version.
Kelsenellenelvian Posted April 28, 2008 Posted April 28, 2008 KK got yaGoanna put a refresh version up soon in the next coupla days anyways!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now