Jump to content

[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).


SetAppAsDefaultAll.exe /Action=SetAppAsDefaultAll /ProgID="Program Id"

You can find the Program Id value you need in the HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications registry key.


To set the latest Windows Photo Gallery 2012 as default:

SetAppAsDefaultAll.exe /Action=SetAppAsDefaultAll /ProgID="WindowsLive.PhotoGallery.16.4"

To set Windows Media Player as default:

SetAppAsDefaultAll.exe /Action=SetAppAsDefaultAll /ProgID="Windows Media Player"

To set VLC as default:

SetAppAsDefaultAll.exe /Action=SetAppAsDefaultAll /ProgID="VLC"


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").


Edited by Francesco
Link to comment
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.

WPI Tool.rar

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...