MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically.

[Tool] Set default application (properly) on Windows Vista/7

Recommended Posts

I made a little tool (attached to this post) that invokes the SetAppAsDefaultAll application registration API to set an application as default on Vista/7. It does exactly the same registration that is performed when you open "Program defaults" and set an application as default.

NOTE: it doesn't work on XP/8 because that registration API is only available on Windows Vista and Windows 7. Windows XP and Windows 8 handle application registrations differently (Win8 blocks applications from changing defaults and XP instead has several different ways of which I can't figure if there is a proper one and which one it is).

The tool also supports waiting for a window to open (/Action=WaitForWindow /WindowName="Window Name" /Timeout=seconds) and closing a windowed application properly by sending WM_CLOSE to the window (/Action=CloseWindow /WindowName="Window Name").

Share this post

Link to post

Share on other sites

This might be pretty handy tool, but being that paranoid internet user I am, I wouldn't want to touch an .exe from unknown person unless source code was provided.

No offence though!

Sure, but having the source code still doesn't guarantee the code hasn't been tampered with, you can only be sure it's clean if you read the code line by line and then compile it yourself. As you can see though VirusTotal reports it being completely clean. I didn't bother adding the sources since it's just 3 API calls for setting the default applications (strangely nobody ever bothered to release a similar tool though) but I attached them to this post.