JD2066 Posted November 14, 2014 Share Posted November 14, 2014 Hi, I have a script setup to create a File Association in Windows 8. I need to use the LaunchAdvancedAssociationUI to open "Default Programs" with my registered application entry selected. I have looked at http://msdn.microsoft.com/en-us/library/windows/desktop/bb776330(v=vs.85).aspx but I can't figure out how to use that API, in part because I know more about scripting languages like JavaScript, Auto3 Scripts and Bash Shell Scripts. I don't know much about programming languages like C, C+, C#, etc. Can anyone help me use this API in an AutoIt3 script? Justin Link to comment Share on other sites More sharing options...
Danyfirex Posted November 14, 2014 Share Posted November 14, 2014 Simply go to registry look the aplication registered name. pass it to the function. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JohnOne Posted November 14, 2014 Share Posted November 14, 2014 @Danyfirex Which dll do you find the function in? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted November 14, 2014 Share Posted November 14, 2014 I suspect it's one of those where you first have to create an interface, so COM stuff. Not as simple as calling dll function. Danyfirex 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Danyfirex Posted November 14, 2014 Share Posted November 14, 2014 Lol sorry I just see the declaration. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JohnOne Posted November 14, 2014 Share Posted November 14, 2014 so did I at first. I'm a com dullard, but perhaps it might be a GUI which can be launched via WMI. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Solution Danyfirex Posted November 14, 2014 Solution Share Posted November 14, 2014 (edited) It should be something like this: Local Const $CLSID_ApplicationAssociationRegistrationUI= '{1968106d-f3b5-44cf-890e-116fcb9ecef1}'; Local Const $IID_IApplicationAssociationRegistrationUI = '{1f76a169-f994-40ac-8fc8-0959e8874710}'; Local Const $sTagIApplicationAssociationRegistrationUI = "LaunchAdvancedAssociationUI hresult(wstr)" Local $oApplicationAssociationRegistrationUI = ObjCreateInterface($CLSID_ApplicationAssociationRegistrationUI, $IID_IApplicationAssociationRegistrationUI,$sTagIApplicationAssociationRegistrationUI) $oApplicationAssociationRegistrationUI.LaunchAdvancedAssociationUI("here the Registered Application name") Saludos Edited November 14, 2014 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Danyfirex Posted November 15, 2014 Share Posted November 15, 2014 Thanks Danyfirex. I see your Code and it works. It does not work. I got this error... thanks for yout time.... Saludos JohnOne 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JD2066 Posted November 16, 2014 Author Share Posted November 16, 2014 It should be something like this: Local Const $CLSID_ApplicationAssociationRegistrationUI= '{1968106d-f3b5-44cf-890e-116fcb9ecef1}'; Local Const $IID_IApplicationAssociationRegistrationUI = '{1f76a169-f994-40ac-8fc8-0959e8874710}'; Local Const $sTagIApplicationAssociationRegistrationUI = "LaunchAdvancedAssociationUI hresult(wstr)" Local $oApplicationAssociationRegistrationUI = ObjCreateInterface($CLSID_ApplicationAssociationRegistrationUI, $IID_IApplicationAssociationRegistrationUI,$sTagIApplicationAssociationRegistrationUI) $oApplicationAssociationRegistrationUI.LaunchAdvancedAssociationUI("here the Registered Application name") Saludos Thanks for the code, it works. Link to comment Share on other sites More sharing options...
Danyfirex Posted November 16, 2014 Share Posted November 16, 2014 You're wellcome Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JD2066 Posted May 23, 2015 Author Share Posted May 23, 2015 (edited) Just an update on this, if anyone sees this topic in the future.In Windows 10 this function will be removed and calls to it will cause a popup to appear notifying the user to go to the settings app to change their Association settings.The blog post listing this change says:Changes to how Windows 10 handles default apps: ‘Default apps’ refers to the way that Windows maps file types and protocols (like HTTP) to the Windows applications they open by default. For example, your favorite photo editor may be set as the default app for .JPG files, which means that when you double-click on a .JPG file in File Explorer, it opens in that photo editor. In Windows 8.1, Classic Windows applications (Win32) could invoke the prompt asking you to change your defaults, so you may have seen multiple prompts during install and after they launched. However, Windows Store apps could not invoke this prompt. Instead, a notification banner will appear after your apps are installed telling you that new apps are available and you would click on this banner to change your defaults.We know your defaults matter to you. With Windows 10, all apps – both Classic Windows apps and Universal Windows apps – will be unable to invoke a prompt to change your defaults, only Windows. You remain in full control of your default experiences, while reducing some of the unwanted noise that multiple prompts can bring.I don't really understand their logic. Instead of just letting Windows Store Apps call this function so both Win32 apps and Windows Store apps could use it. They decided that neither should be able to call this function. Edited May 23, 2015 by JD2066 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now