46
19
I've just recently reinstalled Windows and in setting up my environment I've noticed that all my associations for the various programming languages I edit in Notepad++ have gone (naturally).
I am thinking for the future, wouldn't it be grand to have some kind of batch file that could automatically associate a selection of file extensions with N++ at the click of a button, rather than having to wait until I encounter all these extensions then go through the rigmarole of navigating to the N++ exe etc.
I can't do this with the Default Programs
utility that comes with Windows 7, because it only works with extensions that have been 'encountered'.
So is it possible to programatically associate file extensions with application on Windows?
See also https://stackoverflow.com/q/212906/10245
– Tim Abell – 2018-04-05T19:08:01.910Does the solution have to be powershell as per your tag? – Richard – 2012-03-31T13:48:16.413
1Not at all, just trying to get the interest of the Windows command line junkies. :) – deed02392 – 2012-03-31T13:53:50.600
Use Windows Easy Transfer to transfer your system settings, its built into Windows 7-Vista and can be downloaded for XP...http://www.microsoft.com/download/en/details.aspx?id=7349
– Moab – 2012-03-31T14:24:09.670That's not an option since the original Windows install isn't available anymore. – deed02392 – 2012-03-31T14:40:29.543