On Tuesday, 21 July 2015 at 10:41:54 UTC, Kagamin wrote:
try this:

import std.process, std.stdio;
import core.thread;
import std.random;

void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au réseau local\" Enable"; string off = "netsh interface set interface \"Connexion au réseau local\" Disable";

    while(true)
    {
        executeShell(on);
        const t=uniform(2000, 5000);
        writeln("timeout: ",t);
        readln();
        Thread.sleep(dur!("msecs")(t));
        executeShell(off);
        Thread.sleep(dur!("msecs")(2000));
    }
}

Mmmmh i see, you think that t will be on TLS like this ?
But i'll test later, actually the crash happens after a few iterations, eg i run the script, i check it works, i go away, then when i come back and windows restarted and i got "unexepected .... blue screen" message.

Reply via email to