Click here to Skip to main content
15,888,527 members
Articles / All Topics

S-OOB + W7 = ?

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
7 Oct 2010CPOL 9K  
Registry script to associate your .xap files with sllauncher.exe

Confusing title, I know!

Lately, I have been playing with Silverlight Out-of-Browser (S-OOB) and found it cool but… the fact that I can't just tell it to generate an EXE that I can execute frustrated me! I had to always run it and install! I searched around and found this excellent post by Tim Heuer about Installing Silverlight applications without the browser involved and this got me thinking… Why not just associate .xap file extension with sllauncher.exe? Then a .xap file is a first class citizen in Windows 7 (W7)?

Here is the registry script to associate your .xap files with sllauncher.exe.

[HKEY_CLASSES_ROOT\.xap]
@="xap_auto_file"

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe]

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe\shell]

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe\shell\open]

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe\shell\open\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	/emulate:\"%1\" /origin:\"http://localhost/\""

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe\shell\install]

[HKEY_CLASSES_ROOT\Applications\sllauncher.exe\shell\install\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	install:\"%1\" /origin:\"http://localhost/\"" /shortcut:desktop /overwrite

[HKEY_CLASSES_ROOT\xap_auto_file]
@="Silverlight OOB files"

[HKEY_CLASSES_ROOT\xap_auto_file\shell]

[HKEY_CLASSES_ROOT\xap_auto_file\shell\open]

[HKEY_CLASSES_ROOT\xap_auto_file\shell\open\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	/emulate:\"%1\" /origin:\"http://localhost/\""

[HKEY_CLASSES_ROOT\xap_auto_file\shell\install]

[HKEY_CLASSES_ROOT\xap_auto_file\shell\install\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	install:\"%1\" /origin:\"http://localhost/\"" /shortcut:desktop /overwrite

[HKEY_CURRENT_USER\Software\Classes\.xap]
@="xap_auto_file"

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe]

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe\shell]

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe\shell\open]

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe\shell\open\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	/emulate:\"%1\" /origin:\"http://localhost/\""

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe\shell\install]

[HKEY_CURRENT_USER\Software\Classes\Applications\sllauncher.exe\shell\install\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	install:\"%1\" /origin:\"http://localhost/\"" /shortcut:desktop /overwrite

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file]
@="Silverlight OOB files"

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file\shell]

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file\shell\open]

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file\shell\open\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	/emulate:\"%1\" /origin:\"http://localhost/\""

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file\shell\install]

[HKEY_CURRENT_USER\Software\Classes\xap_auto_file\shell\install\command]
@="\"c:\\Program Files\\Microsoft Silverlight\\sllauncher.exe\" 
	install:\"%1\" /origin:\"http://localhost/\"" /shortcut:desktop /overwrite


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xap]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
	Explorer\FileExts\.xap\OpenWithList]
"a"="sllauncher.exe"
"MRUList"="a"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
	Explorer\FileExts\.xap\OpenWithProgids]
"xap_auto_file"=hex(0):

NOTE: You have to run regedit.exe as administrator to import this script.

Here are the x86 and x64 scripts.

I also uploaded a test xap that you can use to test this with.

This article was originally posted at http://www.rudigrobler.net:80/Blog/s-oob-w7

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --