![]() |
#1 |
Junior Member
Join Date: Jan 2006
Posts: 22
|
Set Vista default app
I needed a simple plugin for setting an app as default for its registered handlers on Vista so I created a wiki page for it in case it comes in handy for anyone else.
SetVistaDefaultApp_plug-in http://nsis.sourceforge.net/SetVistaDefaultApp_plug-in |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Jan 2006
Posts: 22
|
The plugin has been updated to support all of the methods available with IApplicationAssociationRegistration
Application Association Registration plug-in http://nsis.sourceforge.net/Application_Association_Registration_plug-in |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Sep 2006
Posts: 150
|
Thanks for sharing!
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Aug 2004
Location: Poland
Posts: 563
|
Can anyone confirm, that the NSIS plugin (Application Association Registration) fails in latest Windows 10 (18362.356)?
|
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
Fails how? It should not crash but Windows 10 does not allow apps to change the default, only the user can set default apps.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Aug 2004
Location: Poland
Posts: 563
|
@Anders
I am using the following plugin in my installer code: https://nsis.sourceforge.io/mediawik...in&oldid=16469 This plugin allows me to set given app for given extension. It was working very nice. Microsoft is trying to do everything to not allow to do this... I think, the plugin stopped working since last Windows 10 update... When I call this (after adding all neccessary registry entries - see below in my macro): PHP Code:
PHP Code:
Plugin help says: PHP Code:
Here is the macro I use to register extensions for given application (in below exaple I use AIMP as app and aac as registered extension) This is how I call macro: (First parameter (217) is item number in config INI file, where are stored all apps and extensions) PHP Code:
PHP Code:
(Like in above example - make AIMP default app for aac extension - so, when user double click on aac file it will be opened in AIMP) -Pawel |
![]() |
![]() |
![]() |
#7 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
MSDN is very clear.
Quote:
Quote:
IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#8 |
Moderator
Join Date: Aug 2004
Location: Poland
Posts: 563
|
Yes, you are right. It should not work long time ago. But it was working on Windows 10.
|
![]() |
![]() |
![]() |
#9 |
Moderator
Join Date: Aug 2004
Location: Poland
Posts: 563
|
@Anders,
One more question. I need to register Internet Browser (Vivaldi or Opera, whatever) as system default browser in Windows 10 with my installer (in old Windows it was easy, but not in Win10). To do it, I add all needed entries to system registry (to know what entries need to be added I installed the browser on clean virtual system and set it as default) and opens system Settings applet. I do it using the following code: ExecShell "open" "$SYSDIR\control.exe" "/name Microsoft.DefaultPrograms /page pageDefaultProgram" Finally I refresh the shell using this command: System::Call "Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)" This opens this page -> http://www.meggamusic.co.uk/shup/156...efaultApps.png But, I would like to open this window: http://www.meggamusic.co.uk/shup/156...hooseAnApp.png Vivaldi can do this... I wonder how to do this programatically (in NSIS). Do you maybe know the answer? Or anyone? -Pawel |
![]() |
![]() |
![]() |
#10 |
Senior Member
Join Date: Nov 2012
Posts: 166
|
Last edited by Anders; 24th September 2019 at 19:26. Reason: Link workaround |
![]() |
![]() |
![]() |
|
Tags |
assoc, default, shell |
Thread Tools | Search this Thread |
Display Modes | |
|
|