Showing posts with label Vista. Show all posts
Showing posts with label Vista. Show all posts

Friday, May 22, 2009

Vista Multiple Monitors Bug with Terminal Services

If you're running multiple monitors on a Vista machine, and then login to that machine remotely, your remote view will only show the contents of the primary monitor (resized appropriately).

This isn't such a big deal, but if you do this regularly you'll certainly have run across a bug in which the secondary monitor will be reset to its lowest resolution when you log on to the dual monitor Vista machine locally. I think I've blogged about this problem before, but now I have a fix:

When the secondary monitor is stuck at its lowest resolution, do the following:

1) Right click on the desktop and choose Personalize.

2) Click on Display Settings.

3) Adjust the secondary monitor to maximum resolution and click apply.

4) Curse loudly because the monitor resets again to low resolution.

5) Adjust the secondary monitor to maximum resolution and click apply.

6) Goddammit.

7) Disable the secondary monitor and click apply.

8) Adjust the secondary monitor to maximum resolution and enable it.

9) Whatthehellisgoingon?

10) Adjust the secondary monitor to some value between its lowest resolution and maximum and click apply.

11) Eh? For some reason this resolution will stick.

12) Adjust the secondary monitor to its maximum resolution and click apply.

13) Goldarnitall! It'll be back to its lowest resolution.

14) Adjust the secondary monitor to its maximum resolution and click apply.

15) Repeat step 14 until the secondary monitor finally adjusts to maximum resolution.

16) Write blog post.

As you can see, this is a relatively simply procedure. I decompiled the Vista code for setting display resolution, and think I've found the bug (I prettied it up a bit for readability):

if ((userLastLoggedInFrom() == TERMINAL_SERVICES) {
if ((attemptsToChangeResolution() < 35)
&& (rand(100) == 42)) {
setDisplayResultion(requestedValue);
} else {
setDisplayResolution(
(requestedValue < MAXIMUM_RESOLUTION)
? requestedValue : LOWEST_RESOLUTION);
}
}
As you can see, the magic value "35" should probably be something more reasonable, like "23". Perhaps there is a registry hack.

Oh well, this isn't quite as bad as keeping dual monitors working correctly on Ubuntu, for which the only proven solution consists of copying random xorg.conf files from Google searches until you find one that works.

Wednesday, November 26, 2008

Windows 3.1 Lives On Through Vista

If you're anything at all like me, then you were deeply saddened to learn that Microsoft has recently discontinued the licensing of Windows 3.1.

Hey now, cheer up! A little part of Windows 3.1 is still with us. You could even say that it will always be a part of us -- living on in our hearts and nostalgic memories of simpler times. You could also say that it lives in in the form of this dialog box that I found in Vista when trying to install a new font:

Thursday, April 10, 2008

Vista "Run As" Support

Thanks ever so much for changing the behavior of the "Run As" context menu item to better fit your broken User Access Control feature which broke certain vertical apps that run from GPO-mapped network drives thus forcing me to disable UAC. Very clever.

But I can handle it -- I'll just use the runas command from the shell!

Oh, I see you also "fixed" Explorer so that I can't use runas to launch it as a new process. Hm. No problem, let me try using IE to browse the file system. Dag, yo. I see you "fixed" IE in version 7 to launch an Explorer window to browse the file system.

Ok, whew, there's a registry value for Explorer called SeparateProcess which has to be set for the user that I want to run the Explorer process as. Alright, let me add that to my script and verify that it's set...ok...now run it...... .... .... .... .... .... you bastard.

Haha. Ok ok. Good one, seriously. What really gets me is that you had me all excited about the new security features in Vista, but I already had to disable UAC and now I'm looking at running as an administrator just to do my job? Yeah, it's cool that you fixed fast user switching so that we can use it on our domain machines, but who wants to completely switch to an administrator environment just to find a file for someone? Lame.

But you haven't won. I did find a solution.

To anyone who is trying to launch Explorer on Vista from an elevated account, just stop trying. It's a waste of time. Here's what you do:

Instead of trying to get Explorer to work, grab a copy of FreeCommander. FreeCommander is a file manager for Windows and, as its name implies, is free. You can launch FreeCommander with runas successfully, and you'll be able to browse your local file system or network as an administrator or domain administrator.

To make things easier, you can launch FreeCommander with runas from a simple shell script (batch file). Despite what you might think, you do not have to put your password into the runas command to make it work. Simply leave the password out and when you run the batch a command shell will appear asking for your password and once you've entered it, FreeCommander will fire up. All nice and safey safe.

To make things even easier, it's Sysinternals to the rescue once again with ShellRunas v1.01. Run `shellrunas /reg` to register it as a context menu entry, and you'll see a "Run as a different user" item on the menu when you right-click an executable. Basically, this restores in Vista the runas functionality we had in XP. You'll still see the worthless "Run as administrator" entry in the menu, but the world can't be perfect.

(Thank Blod for Mark Russinovich and Sysinternals. Note that Microsoft bought Sysinternals so you'd better grab everything you can now just to be safe.)

Wondering why I chose FreeCommander as my file manager? No? Well read on. Of all the free file managers I found in a quick search, FreeCommander is the only one that didn't puke when run under a secondary login. All of the rest either didn't work well on Vista period, or died horrible deaths when trying to browse the network. None of the programs will recognize Vista's awesome new way of handling mapped network drives, but at least FreeCommander keeps chugging along instead of freezing up and can do UNC just fine.

Here is a list of the programs that I tried on 04/10/08. None of these worked well enough:

Ac Browser Plus (ACB) (trouble on the network when started with runas)
ExplorerXP (blank context menus on Vista)
FileAnt (great program, but freezes on network when started with runas)
UltraExplorer (great looking program, but freezes too often)
muCommander (Java, very bad network support on Vista)

Off all these, only muCommander is GPL. Drag. FreeCommander wasn't my favorite of the five I tried, but it's the only one that doesn't puke when I run it this way.

Anyhow, I added a link to my batch file on my RocketDock (a MUST HAVE application for Windows) and everything is once again golden...or sort of brown anyhow....well, there's a little green in there...

*note: I can already hear the question in my own mind: well this solution works great from my own machine, but what about from my users' machines? Thankfully, my users all run XP with un"fixed" runas, explorer, and yeah, I've stuck them with IE6. When the Vista changes happens against my will, then fast user switching and runas from the shell will get most jobs done just fine.*

Monday, February 11, 2008

Your Vista Sidebar Stinks

The sidebar is not a new concept. You've had a dozen years of sidebar examples to steal from. Yet, in 2007, you managed to release a sidebar that just plain sucks. I'm not crying, but I am wearing a frowny face for sure.

Nine times out of ten, when I reboot Vista, my Sidebar loads its gadgets all out of order, and in some cases, on top of one another.

Next time, try not to include logic to mess up gadget order. And if you get the hankerin' to allow gadgets to stack on top of one another...just close your eyes and count backwards from seven.