Skip to content
May 28 08

My ask of McCain

by Brandon

Recently I have taken part in a few discussion threads over at Neowin pertaining to Barack Obama.  Neowin isn’t a political forum, it’s a technology community; but in times like these – politics seeps in just about everywhere.  A group of individuals over there have repeatedly attacked Obama over meaningless drivel such as the infamous lapel pin “issue.”  I have thought, on multiple occasions, that this marvel of absurdity was behind us.  Each time I have been proven wrong shortly thereafter.

I partake in these discussions as an Obama supporter.  However, I have always spoken highly of both Senator Clinton and Senator McCain.  Clinton was our senator when I lived in NY before moving to Washington.  She was good for NY, and I think she is a very efficient politician who fights for the needs of those who vote for her. 

McCain is a friend to my family, being an outspoken supporter of my uncle, former Blue Angels commander Bob Stumpf, when he was wrongly punished during and after the mishandled “tailhook” investigation that lasted from 1991-1996 (a wrong that was righted, to some degree, under the Bush administration).  I have a deep respect for John McCain because of how he defended my uncle’s honor even when it was unpopular to do so, how he served our great country bravely in Vietnam, and how he continues to serve our country today in the US Senate.

I supported McCain’s bid for the Republican nomination in 2000, and I was obviously quite disappointed at the outcome of that race (an outcome that I think many wise Republicans regret to this day).  I have no ill words for McCain.  He’s a great man, and I am happy that he won the nomination this time around.  However, as you already know – I am supporting Barack Obama come November.  I won’t get into my reasons here, but I believe at this time that he is the best hope we have for the future of our country.

Unfortunately, what I see happening today is quite similar to something I saw back in 2000 and 2004.  Instead of focusing on issues of substance, too many of us focused on distractions – like picking apart every sample of mangled pronunciation or nervous misspeaking that came out of George W. Bush.  I do not exempt myself from this criticism, but instead will hope that I have matured a bit since then.

More than that, I’d like to hope that we all have.  If for no other reason, out of necessity.  During the 2000 election season we were riding an economic bubble, we weren’t in any wars, and we didn’t really feel threatened by any earthly enemies.  Childish discourse was perhaps a luxury we could afford.  Things have changed quite a bit since then, and I think this demands a change in our politics as well.

Senators Obama and McCain have a chance to do that.  But this kind of change cannot happen on one side of the aisle and not the other.  Both sides need to recognize that we have two smart, capable, patriotic candidates who love this country and want to do what’s best for it.

Senator McCain – I ask this of you:  Tell your supporters that you don’t want them to practice the kind of petty political sensationalism that I described in the first paragraph of this post.  Tell them that you don’t want to win this election based on lapel pins, mixed up names of 65 year-old battlegrounds, or who may have lived in the other guy’s neighborhood.  What’s more, tell them you don’t want to lose this election based on your own occasional faux pas, unsubstantiated fears about your mental well-being, or unfounded concerns about your age.

Tell them that your campaign is about who will best lead this country.  Tell them it is not about rumors, fear mongering, or tabloid sensationalism.

Don’t think about whether this is the right way to win.  Think about whether this is the right thing to do.  I believe Barack Obama will make the same gesture (to a large extent, he already has), and that he will call on his supporters to recognize and respect Senator McCain’s action and his desire to elevate our political discourse.

If he does not, then you will win, having proven that he is not the candidate so many of us think he is.  If he does, and this should be our shared hope, then we all win.

The ball is in your court, Senator.

May 22 08

The URL is dead, long live the URL

by Brandon

ReadWriteWeb has an interesting story (if interesting means, “haven’t I read this before?”) titled “The URL is Dead, Long Live Search.”  As you might guess, it’s about search boxes basically replacing the address bar.

This piece caught my attention:

Of the 10 fastest rising search terms on Google last year, 7 were for searches where adding a “.com” would have brought the user to the correct site. These are called “navigational” searches — searches done when the user already knows exactly where he or she wants to end up — and they make up a surprising large number of total seaches.

I question this logic.  Just because the user could have typed “.com” after the search term(s) into the address bar, but didn’t, doesn’t mean the domain / URL wasn’t vitally important.  Why?  Because one of the most significant factors in search engine rankings is the URL.  The reason that “Brandon Tools” returns brandontools.com as the first result is almost entirely the fact that the URL is BrandonTools.com. 

As far as I can tell, nothing has changed recently.  Domains and content-appropriate URLs have always been vitally important to search engine rankings, which have been vitally important to traffic for about 10 years now, especially if you have a brand or trademark that people already recognize.

May 15 08

Rush Limbaugh berates 10th grader’s school essay

by Brandon

The best story I’ve heard this week by far was told today over lunch.  Apparently, a co-worker of mine named George listens to the Rush Limbaugh show in his car, and yesterday heard him discussing Barack Obama’s comments about similarities between the recent housing crisis and the lead-up to the Great Depression (link goes to transcript).  I imagine the comments were referring to the obvious similarities between those who obtained ridiculous sub-prime loans and those in the 1920s who bought stock they couldn’t afford on margin.  However, Limbaugh decided that Obama’s comments were the result of a crazy “liberal education” – and even remarks how “lucky” he is that he didn’t graduate from college, thus allowing him to escape the perils of actual knowledge.

To prove his point, Rush says he did some Google searches for “Great Depression” and then proceeds to attack each of the results as liberal propaganda.  Because we all know that college professors teach straight off of Google results pages.  So my friend is listening and hears something rather striking… the name of one of our mutual colleagues – Paul Alexander Gusmorino (“The Third!” – I love the way Limbaugh says that).  

Limbaugh found among the top results an essay written by Paul, entitled “The Main Causes of the Great Depression,” (link goes to essay).  He quotes Paul’s essay and refutes each of its claims, dissecting them as if they were part of a Harvard professor’s lecture on the subject.  He doesn’t pull any punches either.  “Mr. Gusmorino, you better check Karl Marx and see if you plagiarized him in putting this piece together.”

Ouch.  Those words would be harsh if they really were for a Harvard lecturer.  But that’s not who wrote this essay.  It was my friend who works as a Program Manager at Microsoft.

When he was in 10th grade.

Apr 27 08

Getting the shell to run an application for you – Part 2: How

by Brandon

The key to getting Explorer to do your dirty work lies in the IShellDispatch2 interface.  Particular, the ShellExecute method

IShellDispatch2 is one of the shell automation objects used to support scripting languages.  However, that doesn’t mean you have to use VBScript to gain some value from it.  In this case, IShellDispatch2::ShellExecute is exactly what we want, because it wraps the normal ShellExecute call but runs it from the context of the object implementing the interface – in this case, we want the IShellDispatch2 associated with the desktop shell.

Knowing this is only half the battle, though.  The next trick is to figure out just how to get to the right IShellDispatch2 object (the one for the desktop shell instance of Explorer.exe).

Fortunately, one of our architects, Chris Guzak (seen on C9 here), was able to point me in the right direction and connect up all the dots.

Our hunt begins with the IShellWindows interface, which can be used not only to reliably find the HWND for the desktop shell window, but also to get an IDispatch interface for it:

IShellWindows *psw;
    HRESULT hr = CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&psw));
    if (SUCCEEDED(hr))
    {
        HWND hwnd;
        IDispatch* pdisp;
        VARIANT vEmpty = {}; // VT_EMPTY
        if (S_OK == psw->FindWindowSW(&vEmpty, &vEmpty, SWC_DESKTOP, (long*)&hwnd, SWFO_NEEDDISPATCH, &pdisp))
        {

Next, we need the IShellBrowser interface, and we get that by querying for IServiceProvider and asking the SID_STopLevelBrowser service for an IShellBrowser interface.  And from there we can get the IShellView.

IShellBrowser *psb;

hr = IUnknown_QueryService(pdisp, SID_STopLevelBrowser, IID_PPV_ARGS(&psb));
if (SUCCEEDED(hr))
{
    IShellView *psv;
    hr = psb->QueryActiveShellView(&psv);

From there we need to get to that IShellDispatch2 interface that started this whole adventure. 

IDispatch *pdispBackground;
HRESULT hr = psv->GetItemObject(SVGIO_BACKGROUND, IID_PPV_ARGS(&pdispBackground));
if (SUCCEEDED(hr))
{
    IShellFolderViewDual *psfvd;
    hr = pdispBackground->QueryInterface(IID_PPV_ARGS(&psfvd));
    if (SUCCEEDED(hr))
    {
        IDispatch *pdisp;
        hr = psfvd->get_Application(&pdisp);
        if (SUCCEEDED(hr))
        {
             IShellDispatch2 *psd;
             hr = pdisp->QueryInterface(IID_PPV_ARGS(&psd));

At this point you should be able to figure out where to go from here.

If that’s not easy enough, watch out for Part 3 of this series in the next day or two.  It will contain a sample and describe how the Start++ installer makes use of it.

Apr 26 08

Getting the shell to run an application for you – Part 1: Why

by Brandon

Some people seem to think that calling ShellExecute or ShellExecuteEx and passing the path to an executable will have the effect of telling the shell to launch an application for you.  However, that’s not quite what happens.  These functions simply allow your application to take an action (like launching a process) in the manner the shell typically would (for instance, recreating the behavior of using the Run box).

What’s the difference?  Well, child processes inherit several things from their parents.  They inherit processor affinity, for example.  Most important these days, it seems, is the fact that processes inherit Integrity Level from the process that started them.  That is, except in the case of elevation from medium to high IL (the operation that causes the UAC dialog to appear).

So let’s say you write an installer, and you want to run the application installed at the end of the installation process.  Or heck, maybe you just want to call the application once with a special “/setup” parameter that tells it to do something you couldn’t do from your chosen setup utility.

Where do problems begin?  Well, installers typically run with admin rights.  When your installer launches your application as a convenience to the user, it’s now running with admin rights.  The primary concern here isn’t even the security implications of running at high IL.  After all, the next time your program starts it will run at its normal privilege level.

The problem is that your program is now running in a manner you may not have accounted for when writing it.  For example, users won’t be able to drag-and-drop anything to your application from normal processes.  If your program interacts with other non-admin processes, you may face other problems.  My own Start++ application faced this problem, as it needs to inject a small amount of code into Explorer.exe and then communicate with that code to coordinate its magic.  It can’t do this when running as an admin.

The recent 0.8.x release of Start++ solved this issue, and Start++ now runs immediately after install, in the proper non-admin context.  This is accomplished by having Explorer launch the application on the installer’s behalf. 

Others have addressed this problem in the past.  However, the proposed solutions always seem to take one of these forms:

  1. Write an invoker process that runs with non-admin privileges, starts the elevated installer, and then runs your app at the end.
  2. Use the task scheduler to launch the app.
  3. Inject some code into Explorer and launch from there.

I don’t like #1 because it’s cumbersome and limits how you can name your installer.

#2 also seems cumbersome to me, and is a bit hacky.

#3 is totally hacky, and not something I trust people to do without accidentally destabilizing Explorer (there’s a reason the code Start++ injects into Explorer is incredibly tiny and very carefully crafted).  It can also introduce complications when dealing with multiple target platforms (x86 versus x64).  For example, the CodeProject sample linked to above doesn’t even restrict its WH_CALLWNDPROCRET hook to the thread that it’s targetting.  That means this hook code is immediately going to be loaded by every process on the desktop with a window.  Yuck.

Fortunately, there is a better way.

In Part 2, I describe a better way to get Explorer to run code for you, without having to inject anything into Explorer or use cumbersome workarounds like those described above.

Apr 23 08

New Start++ update

by Brandon

I posted this on BrandonTools.com yesterday, and figured I may as well copy it here.

It’s been a long time since I’ve released an update to Start++.  Since then I’ve been working sporadically on a major overhaul to Start++, which will likely be released as version 2.0.  However, due to time constraints imposed by my real job, and the fact that I have lots of ideas and no PMs to tell me which ones are actually worth implementing – it will likely take a while longer for that to see the light of day.

So in the meantime, I decided to backport several of the fixes I have made in the 2.0 branch.  This does not address all of the known issues with the last update, but I think it provides several worthwhile enhancements.  These include:

  • Better responsiveness to queries for Start Gadgets
  • Fewer intermediate Gadget updates while you’re typing, no longer a chance of “lost characters”
  • Better keyboard and mouse interaction with Start Gadgets
  • Fixed the default Dictionary gadget to have an OnSubmit handler as it was meant to
  • Fixed the calculator gadget (and problems with any gadgets that use OnSubmit but have SubmitNewWindow set to false)
  • Small UI clean-up for gadget rendering
  • Fixed tab ordering for most of the configuration UI
  • Fixed focus of UAC prompts when using commands like “sudo” from the start menu if the Secure Desktop switch is disabled

That last one is tricky, but this fix seems to work well.  Unfortunately, I discovered today that it only works if the Secure Desktop switch is disabled (as you might guess, that’s how I run most of my systems).  This is unfortunate, but hopefully something I can fix in a future update.

Also, the installer is back to its leaner size of 1.2MB or so.  This coincides with a change to ensure the hook installation issue from the past never returns.  The installer no longer includes the merge modules for the 32-bit and 640bit C++ runtimes as the hook DLL now statically links the CRT.

As always, your feedback is appreciated.

More info and download link here.

Apr 11 08

Tech journalism is dead to me

by Brandon

Gary Morgenthaler of Business Week is the latest in a series of tech journalists to really disappoint me.  Why?  Just look at his latest rubbish posted on Business Week’s website today.

Consider the following paragraph and tell me that bias and sensationalism haven’t taken over tech “journalism.”

With last year’s arrival of Vista, Windows has swollen to 1 billion bytes (a gigabyte) or more of software code. The “Mach” kernel of the Mac OS X, however, requires less than 1 million bytes (a megabyte) of data in its smallest configuration, expanding modestly with the sophistication of the application.

So the iPhone kernel is smaller than all of Vista and its included applications.  Sound the alarm, get the president on the line, this is huge news.

What Gary forgets is that the CPU of my Dell workstation is hundreds if not thousands of times smaller than an entire Mac Pro.  I think, advantage Dell.

Of course I’m joking, these comparisons are absurd.  Yet in the very next sentence Gary piles on the bull crap.

This bloating has saddled Vista users with increased costs and poor performance on average computers.

If you look at Apple’s own website, they state that Leopard requires 9GB of available disk space to install.  Not surprisingly, this is almost exactly the same amount of space required for Windows Vista.  But how can that be?  Windows is bloated!  OS X is not!  We know these things, and working backward from this knowledge we can’t possibly come to the conclusion that they’re both just about the same size.  So why bother with the facts at all when you can work backward from what you want to be true?

The facts, in fact, are even worse for Gary’s argument than you might think.  You see, while Leopard and Vista require about the same amount of disk space to install to, one of them does have a far larger kernel image than the other.

The more portly of which is by far OS X.  I just rebooted my Macbook into Leopard to see just how large the kernel was.  The Mach kernel alone, which is only part of the OS X kernel, is 10MB in size.

So how big is the 64-bit Vista kernel on my desktop machine?  4.5MB

But this is hardly a fair comparison.  After all, that’s the size of a 64-bit Windows kernel.  We can’t reasonably compare it to a 32-bit Mac OS kernel (there is no 64-bit Mac OS kernel at the time of this writing).  So what about the 32-bit Vista one?  That weighs in at a massive 3.4MB.

Alright, the sensationalist “journalists” have won me over.  Come on NT guys, 3.4MB?  In 2008?  What’s with all the bloat?

Apr 9 08

Windows Search Indexer Status Gadget

by Brandon

I’m pleased to announce that the second tool to join the BrandonTools.com collection is now available!  It’s a new Sidebar Gadget for those who want to see what the indexer is up to and to easily control its behavior.

Click here for details.

 

Note that the screenshot depicts the gadget running on WS4.  The "index now" button is not available on versions prior to Windows Search 4.

Apr 7 08

A glimpse of the future

by Brandon

Today I saw, for the first time, a software release where an update had to be released to address 32-bit compatibility issues, as the initial release was apparently only tested on 64-bit machines.

Neat. 

Apr 1 08

Microsoft announces Windows 7’s final brand name

by Brandon

Not really, but this was my attempt at an April Fool’s joke this year.  I don’t usually participate in these, but I guess there’s a first time for everything.

REDMOND, Wash. – April. 1, 2008

Today Microsoft Corp. announced the official name of its next-generation Windows® client operating system, formerly code-named “Windows 7.”

Steven Sinofsky, head of Windows engineering, made the announcement at a special event in Los Angeles, California early this morning.  “We really think it’s important to go out there with a brand that users already know and love,” Sinofsky said at the announcement event.  “With all the talk of iPhones and iWorks and iLifes, I think it’s great that we’re bringing the focus back to Me.”

While some in the audience questioned the association of the new brand with an older Windows release, Sinofsky put their fears to rest.  “Windows Me was the most people-centric and consumer-friendly brand of Windows we’ve ever done.  While it may not have ever been our best selling operating system, I think it holds a special place in all our hearts.  We’re going to leverage that.”

With the recent completion of Windows Vista Service Pack 1, Sinofsky says that the Windows engineering team is ramping up development of the next-generation operating system, now called Windows Me Decade Edition.  “We think it’s important that people know we’re not designing this thing for the 21st century.  We’re designing it for the 202nd decade.”

Windows Me Decade Edition Beta

The timeline for releasing Beta 1, targeted at developers and IT professionals, will be announced in the coming months.

Video

Microsoft employee Waggener Edstrom tries out an early build of Windows Millennium Decade Edition, the next-generation operating system.  Los Angeles, California, April 1, 2008.

Watch the “Windows 7” announcement video.

About Microsoft

Founded in 1975, Microsoft (Nasdaq “MSFT”) is the worldwide leader in software, services and solutions that are hilariously named to help people and businesses realize their full potential.

Note to editors: If you are interested in viewing additional information on Microsoft, please visit the Microsoft Web page at http://www.microsoft.com/presspass on Microsoft’s corporate information pages. Web links, telephone numbers and titles were correct at time of publication, but may since have changed. For additional assistance, journalists and analysts may contact Microsoft’s Rapid Response Team or other appropriate contacts listed at http://www.microsoft.com/presspass/contactpr.mspx.