Archive for the ‘Windows7’ Category

RDP “Logon attempt failed” Errors on Windows 7 and Windows 8

Tuesday, November 5th, 2013

Quite suddenly I found that I could no longer log in to various servers on my local network with RDP using a domain password. Local passwords worked fine.

The problem turned out to be related to running RDP 8.0 on my client machines. After much cursing and swearing I found out that all I had to do to fix the problem was modify one group policy on each of the affected workstations. The policy in question was:

\Local Computer Policy\Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Network Security: LAN Manager authentication level

and it needed to be changed to

Send LM & NTLM - use NTLMv2 session security if negotiated

Wasted an entire morning on this. What a PITA!

Providing an Automated Response to NET USE prompts

Tuesday, December 6th, 2011

If you have ever had to the use Windows NET USE command in a batch file, like I have, you will have noticed that occasionally it will notify you of some potential problem and then hang waiting for a response from the user.  This is aggravating but OK if you are running the batch file while you are sitting at the console, but it is a disaster if you are running the batch file in the background (as a scheduled task for instance).  In the latter case, the batch file just sits there forever waiting for a response that will never come.

It turns out that there are two undocumented options for the NET USE command that will automatically answer those annoying messages with a fixed response.  The two options are /Y and /N.  These options will respond to all prompts with Y or N respectively, allowing the batch file to continue.

Using 32-bit ODBC drivers on 64-bit Windows

Tuesday, June 28th, 2011

When you start the ODBC configuration tool from the menu or the control panel on 64-bit Windows, it starts the 64-bit version of the tool.  All well and good.  Unfortunately, this only shows the 64-bit ODBC drivers that are installed on your system.  What if you need to use a 32-bit ODBC driver?

It turns out the quite simple once you know the trick.  You simply need to run the 32-bit version of the ODBC configuration tool.  To do this just browse to c:\windows\syswow64 and double click odbcad32.exe.  This will allow you to configure the 32-bit ODBC data sources that you need.

Black Bars When Displaying TIFF Images Using Windows Image Viewer

Monday, April 25th, 2011

I recently discovered that certain TIFF images generated by our document imaging application were showing ugly horizontal black bars when viewed using the Microsoft Image Viewer on Windows 7 and Windows 2008.  Thinking that this just had to be a problem with our imaging system I spent many hours trying this and that to see if I could figure out what the problem was.  I even bundled up the bad images and sent them off to technical support for the imaging tool kit that we use.  All to no avail.

I finally turned to a developer’s best friend (Google) and spent a couple of hours on that before I found out that the black bars are caused by a known bug in the Microsoft Image Viewer.  There is even a hot fix for it. This is all described in KB 2459492.  Downloading and installing the hot fix solved the problem.

One wonders why Microsoft didn’t release this as part of the Windows Update process.

Slow Remote Desktop Connections on Vista and Windows 7

Monday, December 21st, 2009

After I got my new, blazing fast Windows 7 workstation I started noticing that some, but not all, of my remote desktop connections were much slower than they were from my old, slow XP workstation.  The remote server would take a long time to respond to mouse clicks and key presses.  I suffered with this for a couple of months before I got fed up enough to start researching the problem.

It turns out that Remote Desktop 6.0, the version that ships with Vista and Windows 7, uses a new operating system feature that allows RDP to automatically tune the TCP/IP receive window size.  Theoretically this is supposed to improve network throughput but apparently Vista and Windows 7 have a problem on certain networks.  Not much of a surprise that a new Windows feature would have problems. :(
Anyway, disabling or restricting the auto tuning feature fixes the slow RDP connection problem.  To disable auto tuning completely, enter the following command on the workstation.  You will need to start an administrator mode command prompt first.

netsh interface tcp set global autotuninglevel=disabled

In some cases, simply restricting the auto tuning feature to a more conservative level might fix the problem.  To make the auto tuning feature more conservative, enter the following command on the workstation.

netsh interface tcp set global autotuninglevel=highlyrestricted

There is an excellent blog post that goes more deeply into the technical details here.

Windows 7 Disappearing Desktop Shortcuts

Wednesday, October 21st, 2009

If you create shortcuts to files on a removable drive or a network share on your Windows 7 desktop you will eventually find that your shortcuts just up and disappear from time to time.  This is because the good folks in Redmond decided to automatically schedule a process that “cleans up” your system for you.  Among the many things that it does is delete “broken” and “unused” shortcuts from your desktop.  Broken shortcuts are those that are unavailable, for any reason, at the time the cleanup program runs.  Unused shortcuts are simply those that you haven’t used for a while.  The cleanup program does this without so much as a by your leave and doesn’t even bother to tell you that it has done anything at.  How rude!!

To prevent this from happening, you  need to disable the cleanup program.  To do this:

  1. Start the task scheduler.  Start | All Programs | Accessories | System Tools | Task Scheduler.
  2. Expand the tree in the left hand pane until you get to Task Scheduler Library | Microsoft | Windows | Diagnosis.
  3. In the right hand pane, right click the task named Scheduled and click Disable.

Now the automatic cleanup will no longer run.  Of course, this also prevents the cleanup of various log files so your disk space will slowly start to disappear but I figure this is a small price to pay for a consistent looking desktop.

More Odd Things About Windows 7 64-bit

Friday, September 18th, 2009

It seems that Microsoft just can’t find enough ways to drive you crazy by moving things around.

If you are running 32-bit applications on 64-bit Windows (and who isn’t) you need to be aware that \Windows\System32 is only for 64-bit applications.  All references to System32 made by 32-bit applications are re-directed to \Windows\SysWOW64.  Therefore, all of your 32-bit DLLs need to be placed into SysWOW64 and your 64-bit DLLs go into System32.  Confusing isn’t it.

But we aren’t done yet.  There is a special area in the registry for 32-bit applications as well.  HKEY_LOCAL_MACHINE\SOFTWARE is only accessible to 64-bit applications.  All references to this registry key made by 32-bit applications are re-directed to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node.

No wonder I get headaches.  :(

Cannot Open Type Library Errors in Delphi5 on Windows7

Thursday, September 17th, 2009

Yet another gotcha with Windows7 and older applications.  I was trying to compile one of my ActiveX controls with Delphi5 on my new Windows7 machine and the link was failing with “Cannot open file: myapp.tlb” errors.  It turns out that if Delphi5 doesn’t have write access to the directory where it is installed it won’t work.  Since the security on Windows7 is much tighter than previous versions of Windows the Program Files\Borland\Delphi5 directory was write protected.  Granting “full control” to everyone solved the problem, at the risk of slightly decreased security.

Manually Registering COM Dlls in Windows 7 (Error 0×80004005)

Tuesday, September 15th, 2009

If you ever need to manually register a COM or Activex Dll in Windows 7 using regsvr32 you will probably get an error 0×80004005.  Microsoft doesn’t bother to actually tell you what this error means but it turns out that it just means that you don’t have sufficient privilege to execute the command.  All you need to do right click on the command prompt link in the start menu and select “Run as administrator”.  Then issue the regsvr32 command from the privileged command prompt and all will be well.

Running TurboPower ProActivate on 64-bit Windows

Tuesday, September 15th, 2009

I have been using the old TurboPower ProActivate product to license my software for years.  TurboPower went out of business years ago but that wasn’t important because the software just kept working.  Well time advances and I am finally migrating my development workstation from 32-bit Windows XP to 64-bit Windows 7.  Lo and behold, when I try to install ProActivate on the new workstation, I find out that the installer (setup.exe) is a 16-bit program, which cannot run on a 64-bit OS.  What to do?

It turns out that all I needed to do what this:

  1. Copy \Program Files\TurboPower\ProActivate to the new workstation.
  2. Copy appobj.dll and licobj.dll from \windows\system32 on the old workstation to \windows\syswow64 on the new workstation.
  3. Use regsvr32 to register appobj.dll and licobj.dll on the new workstation.
  4. Copy the TurboPower\ProActivate folder from the start menu on the old workstation to the start menu on the new workstation.

Et, voila.  Everything works!

Dodged a bullet there. :)