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,862 other subscribers

Archive for the ‘Windows Vista’ Category

Translating non-English error messages into English

Posted by jpluimers on 2015/08/06

For a long time, I’ve persuading people to install English versions of their operating systems (especially on server side) at least for some parts of their environment.

The main reason is that searching for English error messages gives you a much bigger chance of finding the cause than non-English ones.

I’m still standing by that recommendation, but life has become a bit easier because of these two sites that offer quite good translations of Windows Error messages in many languages to English:

I like the latter a bit more because of the overview, but the former more because of the catalog.

The way I landed there was because of a search for “Cannot SetData on a frozen OLE data object” which I bumped into for one of my C# .NET projects.

–jeroen

Posted in .NET, C#, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista | Leave a Comment »

Saving MMC files as MSC and prevent the “save console settings” dialog.

Posted by jpluimers on 2015/07/24

Two tricks when creating MSC files that contain the snap-in configuration of the MMC (Management Console).

Normally you do this once:

  1. Start MMC
  2. Add some snap-ins
  3. Save your configuration as an MSC file

And then when you need that particular configuration, each time:

  1. Open the MSC file
  2. Perform some actions
  3. Close the MMC
  4. Answer No to this question:

---------------------------
Microsoft Management Console
---------------------------
Save console settings to [filename].msc?
---------------------------
Yes No Cancel
---------------------------

The trick around this last question is:

Read the rest of this entry »

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | Leave a Comment »

Windows < 8: User variables are not resolved correctly in Windows if they contain %APPDATA% or %LOCALAPPDATA%.

Posted by jpluimers on 2015/07/13

Older Windows versions than 8.x will not correctly expand %APPDATA% or %LOCALAPPDATA% in environment variables: User variables are not resolved correctly in Windows..

This even happens when the registry storage of the environment variables are marked as REG_EXPAND_SZ under these keys:

Basically there are four categories of Windows versions:

  • For Windows 10.x this is fixed.
  • For Windows 8.x and Windows Server 2012 R2, there are updates in KB2919355.
  • For Windows 7.x and Windows Server 2008 R2, there is a hotfix.
  • For older Windows versions, there is no solution.

–jeroen

via: User variables are not resolved correctly in Windows.

Posted in Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista | Leave a Comment »

Error 13EC when installing The .NET Framework 4.5.2 means you need to free more disk space. 3GB that is.

Posted by jpluimers on 2015/05/23

About a year and a half ago, I wrote:

My conclusion is that various Microsoft updates now require 3 gigabytes of disk space.

This seems to be the case with the .NET Framework 4.5.1 KB 2858725 update, and probably more future updates. I tried installing the KB 2858725 update with slightly less than 3 gigabytes of space (and after the 3 gigabyte reserve.tmp appeared), and I was still getting error 13EC. But with slightly more than 3 gigabyte the update would install.

That is quite difficult when you run loads of VMs on SSDs: they usually don’t have an awful lot of disk space left.

The same issue holds for Microsoft .NET Framework 4.5.2 for Windows 7 x64-based Systems (KB2901983) which got released earlier this week:

Read the rest of this entry »

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista | 1 Comment »

Debugging problems with the network proxy (via: The Chromium Projects)

Posted by jpluimers on 2015/05/08

In this case, another tool didn’t obtain the right Proxy settings.

Chrome to the rescue as chrome://net-internals/#proxy shows you the system proxy settings:

When browsers are experiencing network problems, generally the first thing to test is your network proxy settings. Misconfigured settings, or misbehaving settings, can have a profound impact on your network traffic possibly resulting in pages not loading at all.

Main take aways: chrome://net-internals/#proxy

Since then, I created this small batch file:

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr proxy

And this one to edit the settings:

"C:\Windows\system32\rundll32.exe" shell32.dll,Control_RunDLL inetcpl.cpl,,4

It will open the same Window that your Control Panel or Internet Explorer uses to manage connection and proxy settings.
From there click the “LAN Settings” button to edit the proxy configuration.

–jeroen

via: Debugging problems with the network proxy – The Chromium Projects.

Posted in Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

Batch file that finds and starts Cntlm.exe in verbose mode.

Posted by jpluimers on 2015/04/13

As a follow up on the Cntlm configuration post last week, here is a small batch file that will find Cntlm.exe (on x86 and x64 systems) then start it in verbose mode.


call :start %ProgramFiles%
call :start %ProgramFiles(x86)%
goto :end
:start
startlocal
set cntlm="%*\Cntlm\Cntlm.exe"
echo %cntlm%
if exist %cntlm% start "Cntlm verbose" %cntlm% -v
endlocal
goto :end
:end

–jeroen

Posted in Cntlm, Development, Fiddler, NTLM, Power User, Web Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

How to fill proxy information in cntlm config file (via: Stack Overflow)

Posted by jpluimers on 2015/04/10

This is an elaboration of How to fill proxy information in cntlm config file – Stack Overflow.

When digging around how to get authentication stuff going, I want as much information, so this was the command-line I used:

cntlm.exe -v -c cntlm.ini -I -M http://www.bbc.co.uk

The -v is important: it shows you why things fail, and where: It also shows you the NTLM headers sent back/forth over the wire.

These are the switches used:

  • -v verbose
  • -c configuration file
  • -I interactive (prompt for password)
  • -M magically detect the NTLM level used by the proxy

Since it is unsafe to store plain text passwords in configuration files, cntlm allows you to store the hashes.

Storing hashes not passwords locally is safer, but not much safer. See for instance Still Passing the Hash 15 Years Later: Guest Post: Let’s talk about Pass-the-Hash by Scriptjunkie the video How to own a Windows Domain or search for Mark Russinovich video windows hash ntlm hack.

Anyway: you can generate the password hashes using either     Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, Fiddler, git, HTTP, Internet protocol suite, Mercurial/Hg, NTLM, Power User, Software Development, Source Code Management, TCP, Web Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Vista | 1 Comment »

Some command-line tips for OpenSSL and file format (pfx, p12, cer, crt, key, etc.) conversion of certificates, keys

Posted by jpluimers on 2015/02/27

OpenSSL is really nice, but remembering all these command-line switches is difficult, especially when you do not use them often enough.

I don’t, and when I do there are a few common tasks I perform, and I was glad to find a few links with great information:

I’ve converted them to batch files that run fine when copied to the directory where you put the x86 or x64 Windows version of OpenSSL (they assume %~dp0openssl.exe for the location of the OpenSSL.exe binary, just in case it is not on the path, or you have various tools that scattered around incompatible copies of OpenSSL binaries).

OpenSSL defaults to PEM format (that has text base64 strings), so if you get DER format (binary) you need to convert them.

A few errors I got and what they mean

Error decrypting PKCS#7 structure

Error decrypting PKCS#7 structure
5216:error:21070073:PKCS7 routines:PKCS7_dataDecode:no recipient matches certificate:.\crypto\pkcs7\pk7_doit.c:538:
5216:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:.\crypto\pkcs7\pk7_smime.c:557:

This error means that the recipient of the email does not match the certificate you pass in. What happens is that OpenSSL tries to decrypt the mail, it cannot match the certificate to the mail, and barfs. It usually happens when you have From/To reversed by accident.

Error decrypting PKCS#7 structure

Error decrypting PKCS#7 structure
4948:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:.\crypto\x509\x509_cmp.c:330:
4948:error:2107207F:PKCS7 routines:PKCS7_decrypt:private key does not match certificate:.\crypto\pkcs7\pk7_smime.c:552:

This means somewhere you mixed up a private and public key in the certificate files.

Use something like the OpenSSL wrapper verify-private-key-matches-certificate-x509-pem-cer.bat to verify them.

Error reading S/MIME message

Error reading S/MIME message
6900:error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data:.\crypto\asn1\a_d2i_fp.c:251:
6900:error:0D0D106E:asn1 encoding routines:B64_READ_ASN1:decode error:.\crypto\asn1\asn_mime.c:193:
6900:error:0D0D40CB:asn1 encoding routines:SMIME_read_ASN1:asn1 parse error:.\crypto\asn1\asn_mime.c:528:

OpenSSL does not like .EML files to end with a period (. which SMTP needs to process when sending an .EML file).
See https://gist.github.com/anonymous/7233372 and https://gist.github.com/anonymous/7233329
The former throws this error, the latter not. This is not caused the width of the base64 encoding (not yet archived at the WayBack machine), which I initially thought, but the terminating period.

Verification failure

Verification failure
8228:error:21075075:PKCS7 routines:PKCS7_verify:certificate verify error:.\crypto\pkcs7\pk7_smime.c:342:Verify error:self signed certificate in certificate chai
n

–jeroen

Posted in base64, Development, Encoding, MIME, OpenSSL, Power User, Security, 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 »

Installing the PIXMA mini260 – Canon Europe drivers under Windows 8.1 x64 – trying to say goodbye to Windows XP

Posted by jpluimers on 2015/02/23

Ditching Windows XP meant finding drivers for some older devices.

One of them is a [Archive.is] Canon PIXMA mini260 Photo Inkjet Printer which prints marvellous photos in a borderless way (so no post processing needed).

Installing drivers on Windows 8.1 x64 turned out to be really easy despite the fact that the Canon site does not offer them:  just install the “Windows Vista (64-bit)” drivers from this Canon link: [Wayback] PIXMA mini260 – Canon Europe.

This works as the printer driver model hasn’t changed much since Vista and the Vista drivers do not contain limits on future version numbers (see [Wayback] Getting older Windows drivers to work in Windows 8 for another example).

Now I need to find a way to get my [Archive.is] Olympus Camedia P-400 Digital Color Photo Printer. That is a lot harder: the most recent Windows P-400 Printer > Software Downloads are for Windows XP.

If anyone knows a workaround for this, I might connect this to an XP VM in a walled garden:

Under Windows XP, often the P-400 driver installer didn’t even want to install the USB part of the drivers.

How can I work around this?

Might it be that only the parallel LPTENUM is included in the [Wayback] Windows XP P400N.inf file, unlike the [Wayback] Windows 2000 driver P400N.INF file that contains both [Wayback] LPTENUM and [Wayback] USBPRINT and the [Wayback] P-440 INF file only has USBPRINT?

Other vendors seem to include both in their .INF files like this [Wayback] Dell 3130cn INF file.

–jeroen

via:

Posted in Power User, Vista, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Vista, Windows XP | Leave a Comment »

Binary builds of Win64 and Win32 OpenSSL (via: Shining Light Productions)

Posted by jpluimers on 2015/02/20

The quickest way to get Win64 and Win32 binary builds of the youngest OpenSSL, you should get them from Shining Light Productions – Win32 OpenSSL.

Despite the link name, you can get the Win64 binaries from there too..

Besides binaries, they also have the source to build them from, and any other redistributable you’d need.

They run on virtually any Windows version, though I only used them on NT based Windows versions of XP/2003 and younger.

Two notes:

  • you usually need the Visual C++ 2008 redistributables, of which there is both an x86 and an x64 version (the OpenSSL installer just tells you it is missing, and assumes you know if it is the x86 or x64 one).
  • unless you are a software developer wanting to link to OpenSSL, the “Light” versions of the installs suffice.

–jeroen

via: Shining Light Productions – Win32 OpenSSL.

Posted in OpenSSL, Power User, Security, 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 | 1 Comment »