The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • 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,861 other subscribers

Archive for the ‘Windows’ Category

Taking Screenshot on multiple platforms (via Wikipedia, the free encyclopedia)

Posted by jpluimers on 2014/11/28

Cool, I just found out that Wikipedia has a Screenshot topic, listing how to take screenshots (and often shots of the current window) on many platforms, where (*) means I verified them:

  • Apple Mac OS X
    (*) Use “⌘ Cmd+⇧ Shift+3” for the screen or “⌘ Cmd+⇧ Shift+4” for a part of the screen (as of Mac OS X Tiger, you can press the “Spacebar” to capture a Window in stead of part of the screen). You can press “Ctrl” with these shortcuts to the shot goes to the clipboard, otherwise it gets saved as a PNG file.
  • Microsoft Windows
    (*) Use “Prt Sc” for the screen or “Alt+Prt Sc” for the Window
    (note that on my laptop and multi-media keyboards, you need to type the “Fn” key in order to press the “Prt Sc”)
  • Microsoft Windows Phone
    Press the “Sleep/Wake” button and the Startbutton at the same time.
  • Apple iOS
    (*) Press the “Home” and “Lock” button at the same time.
  • Google Android
    Hold the “Volume down” button, then press the “Sleep/Wake” button.
    (*) Or press the “Sleep/Wake” and the “Home” button at the same time.
  • HP WebOS
    Press the “Orange/Gray Key+Sym+P” at the same time.
    Or press “Home Key+Power” at the same time.
  • X Window System
    Varies with the installed tooling
  • Maemo 5
    Press “Ctrl+⇧ Shift+P” at the same time.
  • Google Chrome OS
    Press “Ctrl+F5” to capture the screen or press “Ctrl+⇧ Shift+F5” to capture a portion of the screen.

–jeroen

via: Screenshot – Wikipedia, the free encyclopedia.

Posted in Android Devices, Apple, Chrome, Google, HTC, HTC Sensation, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Nexus 4, OS X 10.8 Mountain Lion, Power User, Uncategorized, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

running dig DNS under Windows

Posted by jpluimers on 2014/11/21

The dig (domain information groper) command under unix/Linux is a great way to help verify that a DNS host like BIND is working properly.

A few of my servers are Linux, but most of my desktops usually are Windows, so I was happy to find the Using the dig dns tool on Windows 7 article by Dan Esparza explaining there is a Windows version.

So I:

  1. Downloaded the Windows version of BIND (I took the BIND 9.9.2-P1 ZIP file)
  2. Unzipped that into my C:\BIN\BIND directory
  3. Ran this command, just like I would on a Linux box:
    dig @192.168.171.214 pluimers.com
  4. Checked the below output to the zone configuration on the openSUSE box serving the DNS for my domain

; <<>> DiG 9.9.2-P1 <<>> @192.168.171.214 pluimers.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12911
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 6

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;pluimers.com.                  IN      A

;; ANSWER SECTION:
pluimers.com.           172800  IN      A       82.161.132.169

;; AUTHORITY SECTION:
pluimers.com.           172800  IN      NS      ns7.4delphi.com.
pluimers.com.           172800  IN      NS      ns6.4delphi.com.
pluimers.com.           172800  IN      NS      ns2.4delphi.com.
pluimers.com.           172800  IN      NS      ns1.4delphi.com.
pluimers.com.           172800  IN      NS      ns3.4delphi.com.

;; ADDITIONAL SECTION:
ns1.4delphi.com.        172800  IN      A       82.161.132.169
ns2.4delphi.com.        172800  IN      A       176.9.152.132
ns3.4delphi.com.        172800  IN      A       176.9.152.131
ns6.4delphi.com.        172800  IN      A       109.70.6.22
ns7.4delphi.com.        172800  IN      A       176.9.143.167

;; Query time: 15 msec
;; SERVER: 192.168.171.214#53(192.168.171.214)
;; WHEN: Wed Jan 02 16:07:58 2013
;; MSG SIZE  rcvd: 235

–jeroen

via Dig (command) – Wikipedia, the free encyclopedia.

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Windows, Windows 7 | Leave a Comment »

Moving a Subversion/SVN including history to Mercurial/HG using TortoiseHG or HG command-line tools

Posted by jpluimers on 2014/11/17

This blog entry shows how I moved my BeSharp.net repository from SVN at BeSharp.codeplex.com to mercurial.

I develop most of my software using Windows, so if you want to perform the steps below (except TortoiseHG) on a *nix or Mac machine, you have to do some backslash to slash replacement, and find out where the mercurial settings file is stored.

The rest is pretty much the same.

Note the aim was to do a one time conversion. If you want to use both SVN and HG at the same time, then HgSubVersion definitely worth looking at.

Step zero: enable the convert extension (once per client machine)

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, Mercurial/Hg, Power User, Software Development, Source Code Management, Subversion/SVN, Windows | Leave a Comment »

Introducing nogotofail—a network traffic security testing tool for TLS/SSL – via: Google Online Security Blog

Posted by jpluimers on 2014/11/07

Great! And it is open source at https://github.com/google/nogotofail:

The Android Security Team has built a tool, called nogotofail, that provides an easy way to confirm that the devices or applications you are using are safe against known TLS/SSL vulnerabilities and misconfigurations. Nogotofail works for Android, iOS, Linux, Windows, Chrome OS, OSX, in fact any device you use to connect to the Internet.

There’s an easy-to-use client to configure the settings and get notifications on Android and Linux, as well as the attack engine itself which can be deployed as a router, VPN server, or proxy.

–jeroen

via Google Online Security Blog: Introducing nogotofail—a network traffic security testing tool.

Posted in *nix, Android Devices, Chrome, Google, iOS, Mac OS X / OS X / MacOS, OpenSSL, Power User, Security, Windows | Leave a Comment »

Windows .RES/Resource editors

Posted by jpluimers on 2014/11/07

While researching the manifest problem I will post about next week, I made a short list of free Windows Resource Editors:

All other resource editors I found were not free, and someof them not maintained for an even longer period than the free ones.

–jeroen

Posted in Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 4 Comments »

Indent/Unindent text in PowerShell ISE

Posted by jpluimers on 2014/10/31

When searching for powershell ise indent tab, I came across this very nice post by rpscripter:

If one selects multiple lines, then pressing tab will indent them all.  Pressing shift+tab will un-indent them all.

Yes, I know the PowerShell is limited, so the indents are tabs (not spaces) and you cannot change the tab size: Powershell ISE – change indent/tab size + keep tabs.

–jeroen

via:

Posted in CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Old and invalidated by the Microsoft RDP client in the Mac App Store: Best RDP client for Mac OS X Lion and up

Posted by jpluimers on 2014/10/10

Back when I wrote this mid 2013, this was the best Windows RDP overview article I could find: Best RDP client for Mac OSX Lion.

And it all got invalidated when finally (after years of silence), Microsoft released AppStore versions of the RDP client for both Mac OS X and iOS:

Microsoft Launches ‘Remote Desktop’ Apps for Mac and iOS – Mac Rumors.

So I tried the Mac App Store – Microsoft Remote Desktop that runs on OS X 10.6.0 or later for more than a year, and I like it a lot.

This is what the AppStore version improved over the classic Microsoft Remote Desktop Connection:

  • It has more regular updates.
  • It remaps the Mac Command key to the Microsoft Windows logo key.
  • It uses the new RDP protocol version features which means fast response, even on slow network connections and better security.
  • Full screen support is superb.
  • Clipboard integration just works.
  • It is really stable.

Just so you know about alternatives,

for the record, this is the draft I wrote in 2013: Read the rest of this entry »

Posted in Apple, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 3 Comments »

The CD pseudo environment variable in batch file: do not overwrite it with a real one!

Posted by jpluimers on 2014/10/08

I never realized you could overwrite the CD pseudo environment variable. If you do, the automatic value of the pseudo variable will not be udpated any more:

You have at some point set the CD variable explicitly. If you do this it will no longer automatically reflect the current working directory. To undo this, set it to empty:

set CD=

Thanks Jonathan and for explaining this in both your answers.

Thanks to another answer by Endoro I now also know of the %=C:% pseudo variable (you have one per drive letter) that indicate the current directory per drive letter.

–jeroen

via: batch file – When is the CD environment variable updated? – Stack Overflow.

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 2 Comments »

Great answer on “windows – What encoding/code page is cmd.exe using” (via: Stack Overflow)

Posted by jpluimers on 2014/10/06

I just found this [Wayback] great answer (which by now regrettably is deleted; the previous Wayback link still has it) by [Wayback] Јοеу a.k.a. Johannes Rössel on [Wayback] What encoding/code page is cmd.exe using.

The whole answer is worth reading, so I won’t quote only some bits.

Edit 20210609: the answer now has been replaced by an even more detailed answer [Wayback] by [Wayback] andrewdotn. Also recommended reading. The summary of the new answer is this:

The moral of the story?

  • type can print UTF-16LE files with a BOM regardless of your current codepage
  • Win32 programs can be programmed to output Unicode to the console, using WriteConsoleW.
  • Other programs which set the codepage and adjust their output encoding accordingly can print Unicode on the console regardless of what the codepage was when the program started
  • For everything else you will have to mess around with chcp, and will probably still get weird output.

–jeroen

via:   windows – What encoding/code page is cmd.exe using – Stack Overflow.

Posted in Batch-Files, Development, Encoding, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Windows: authenticated command-line download from IIS server wget: no, cURL: yes.

Posted by jpluimers on 2014/10/03

Had to download a bunch of stuff over the command-line from an IIS server that was using authentication. Not basic authentication, but NTLM authentication.

wget kept failing, even wget 1.10 that usually does NTLM quite OK (but up to 1.10.2 has a security vulnerability so you should not use wget 1.10 any more).

So I installed a Windows x86 cURL binary, and downloaded+copied the root certificates, then did some reading on the command-line switches.

Without any, cURL does http basic authentication. But a Windows server usually expects NTLM authentication (hardly documented, but it uses the Negotiate protocol).

When not using NTLM, both would show (wget -d, or curl -v) this in the output, indicating you should use NTLM authentication: Read the rest of this entry »

Posted in *nix, *nix-tools, cURL, Linux, Power User, SuSE Linux, wget, Windows, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2 | Leave a Comment »