The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @Moonalice: Brittany Kaiser calls for “assign[ing] criminal liability to executives of companies that allow data protection violations t… 1 hour ago
    • RT @FTM_nl: Big data is sterk in opmars binnen de jeugdgezondheidszorg, waardoor het doen en laten van gezinnen ongemerkt gevolgd kan worde… 1 hour ago
    • RT @Bdankt: Komt er naast de voedselbank en kledingbank nu ook een medicijnenbank? 2019: Vrouwen die elkaar hielpen door bepaalde merken va… 1 hour ago
    • RT @SwiftOnSecurity: Trying to get information from the network team during an incident 1 hour ago
    • A thread well worth reading.… 1 hour ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,825 other followers

Posts Tagged ‘command-line’

Windows command-line: Finding default routes and setting their metric

Posted by jpluimers on 2014/03/23

When you have multiple network connections, sometimes you want to prefer one to be used as “default” (i.e. because it has higher speed or lower latency).

Windows already tries to accommodate for that by assigning “metrics” to your network connections. They depend on the kind of network (wired over wireless) and speed of the connection.

To see the current default network routes and their metrics, you use the route print command and filter it with findstr like this:

route print | findstr /C:"Metric" /C:""

The “” string is to filter out the default routes, and “Metric” includes the header line.

For one of my XP machines, the result is this:

Now, even though both metric are 10, my gateway is much slower than my gateway, so I want to prefer the last one. Read the rest of this entry »

Posted in Power User, Windows, Windows 7, Windows 8, Windows Vista, Windows XP | Tagged: , , , , , | Leave a Comment »

Windows Service: Stopping/Starting from the console with a delay

Posted by jpluimers on 2014/02/25

When stopping Windows Services from the command line using `net stop`, then you often get time outs like these:

C:\Windows>net stop "FooBar Survur"
The FooBar Survur service is stopping.
The FooBar Survur service could not be stopped.

C:\Windows>net stop "FooBar Survur"
The FooBar Survur service could not be stopped.

Neither the `net stop`, nor the `net start` command allows for specifying a time-out, so it uses the default time-out of 5 seconds. Which often is not long enough.

Luckily, both the Windows sc command and the free 3rd party Windows Service Manager (SrvMan) are able to stop these services.

Note that both tools: Read the rest of this entry »

Posted in Power User, Windows, Windows 8 | Tagged: | Leave a Comment »

%d bloggers like this: