The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,722 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:" 0.0.0.0"

The “0.0.0.0” 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 192.168.71.1 gateway is much slower than my 192.168.171.1 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: