# Friday, May 28, 2010

PrintDialog not working on Windows 7

Updating a program of mine I noted that when I called the PrintDialog and passed it my PrintDocument (or variant thereof), I did not get any said PrintDialog.

Long story short - you just set the UseEXDialog to true:

PrintDialog _printDialog = new PrintDialog();
_printDialog.UseEXDialog = true;

See http://msdn.microsoft.com/en-us/library/system.windows.forms.printdialog.useexdialog.aspx for more info

# Monday, May 03, 2010

Unable to map drive in Windows 7

While trying to map a drive to an older server in w07 it informed me that the network password was wrong, even though I KNEW it was correct.

After a lot of hunt and peck I came across the issue - basically by default it refuses to transmit the login except in the highest format (NTLM v2). Which makes sense, and is undoubtedly documented somewhere. EXCEPT IN THE ERROR THAT IS RETURNED! I mean it might at least give a hint rather than just rejecting the password.

Solution (demonstrated just on a local box but this can also be done via a domain Group Policy): go into your Local Security Policy.

Go into Security Settings/Local Policies/Security Options and go down to "Network Security: Lan Manager authentication level"

Set it to "Send LM & NTLM - use NTLMv2 session security if negotiated". This will give you backward compatibility.

Of course, the real solution is to move everything to NTLMv2...

# Tuesday, September 29, 2009

UAC or the return of Clippy

I was pondering the UAC (User Access Control) on Windows Server 2008 and Windows 7 (nobody talks about Vista anymore) and it occurred to me that the experience of interacting with it reminded me of another time. An annoying, apparently helpful attempt by Msoft that actually prevents you from doing work (see here). Suddenly it struck me - the return of 'Clippy'!!!

Now, first off, I can understand MSoft's implementing the UAC. After all, everyone knows that MSoft is so full of holes that it should if it were a cheese it would be swiss cheese. Everyone knows that, even if it is not necessarily true. So to convince everyone that they were secure they had to prevent users (that would be us) from doing stupid things. Like installing programs that should not be installed or changing setting that would render their computer unbootable. Because, of course, if a user does those things than the people REALLY at fault are not the users (heaven forfend) but MSoft!

To quote on of my favorite sayings - "calling something foolproof fails to take into account the ingenuity of fools."

They have to do this because we are so stupid as a race that an entire industry has sprung up to inform us of the obvious. Such as "do not put a gasoline can in a fire" or "ax blades are sharp" or (as in this picture) "this egg product contains eggs".

Still, there has to be some sort of happy medium. W08 only offers two options - on or off. W08R2 offers more (and I will make some notes on that in another blog) but I fear that in general MSoft has gone too far in the wrong direction. They are so concerned with protecting us that they are annoying us. And if something becomes annoying we generally stop doing it.

Goodbye Clippy. Goodbye UAC.

Do I have a solution? Of course not. Except to suggest that the UAC could be tweaked to be more specific. What I mean by that is simply that rather than trying to prevent you from doing EVERYTHING, it should only prevent the main crucial things. Perhaps it should not question you when you are installing programs but only when you are not installing them from an executable from a DVD or from your local drive.

Or perhaps the solution is that high-end users simply turn 'Clippy' off. He is annoying and YES I DO KNOW WHAT I AM DOING AND I WANT TO DO THAT!

At least, most of the time...