Click here to Skip to main content
Licence CPOL
First Posted 7 Oct 2010
Views 3,506
Bookmarked 0 times

S-OOB + W7 = ?

By | 7 Oct 2010 | Technical Blog
Registry script to associate your .xap files with sllauncher.exe
A Technical Blog article. View original blog here.[^]

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.

License

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

About the Author

rudigrobler



South Africa South Africa

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 7 Oct 2010
Article Copyright 2010 by rudigrobler
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid