Page 1 of 1

Does anyone still have Melcher's launcher?

Posted: Mon Dec 02, 2019 6:24 pm
by Kimberly5384
Does anyone still have the launcher for the trust advisor? I haven't been able to find a working link, and I'd like to test it on some LH builds. Thanks in advanced!

Re: Does anyone still have Melcher's launcher?

Posted: Mon Dec 02, 2019 7:17 pm
by yourepicfailure
AFAIR I don't think it was ever released.

Re: Does anyone still have Melcher's launcher?

Posted: Mon Dec 02, 2019 11:46 pm
by Kimberly5384
So is there another way to get this to show up? I assume through the registry?

Re: Does anyone still have Melcher's launcher?

Posted: Tue Dec 03, 2019 2:17 am
by yourepicfailure
Sadly no, Melcher had to write a launcher to trigger it.

Re: Does anyone still have Melcher's launcher?

Posted: Wed Dec 04, 2019 3:30 pm
by Melcher
You're in luck. I still have the original code of the "TrustMeNot" launcher I wrote in 2014. It's very plain and simple: the code creates a new (Avalon) NavigationApplication with a single NavigationWindow. Using a BindProductUri we can navigate the window to any resource we point it at (XAML files or even VoidPageFunction objects). In this case, there are a few options (see the commented out lines in Main()).
And yes, it's written in VB.NET :? You would be able to compile this using SharpDevelop directly from Longhorn. Make sure to import the necessary Avalon and shell dlls: ShellInterop, Avalon.UI, Avalon.Utility and Avalon.Core. It might not dispay the trust advisor out of the box, but if you are willing to do some decompiling of Avalon binaries and use this code to bootstrap your Avalon windows, I'm sure you'll find some interesting things ;)

Code: Select all

'
' Created by SharpDevelop.
' User: Melcher
' Date: 8/26/2014
'
Imports System
Imports System.Windows
Imports System.Threading
imports System.Windows.Interop
Imports System.Windows.Controls
Imports System.Windows.Navigation

Module Main
	Sub Main()
		'Launchdialog("object://ShellInterop/System.Windows.Client.Privacy.ConsentMain", "Consent", 600, 550)
		Launchdialog("res://Microsoft.Windows.Client/LocalResources/Consent.xaml", "Consent", 600, 550)
		'Launchdialog("object://DisplayCpl/System.Windows.Shell.ControlPanel.Display.RootPage", "Some window", 600, 600)
	End Sub
	
	Private Sub LaunchDialog(uri As String, title As String, width As integer, height As integer)
		If Not uri = Nothing And Not title = Nothing Then
			'this is the important part: we need a navigation application as base
			Dim navapp as NavigationApplication = New NavigationApplication()
			Dim navwind = New NavigationWindow()
			navwind.Text = title
			Dim boxUnit = New BoxUnit(CSng(width))
			navwind.Width = boxUnit
			Dim boxUnit1 = New BoxUnit(CSng(height))
			navwind.Height = boxUnit1
			'navwind.ShowDialog()
			navwind.Navigate(New BindProductUri(uri))
			navapp.Run()
		End If
	End Sub
End Module

Re: Does anyone still have Melcher's launcher?

Posted: Thu Dec 05, 2019 5:46 pm
by Kimberly5384
Wow! Thanks for this. On a side note: I'm really inspired by your work and your contributions to unlocking some hidden longhorn features!