S-OOB + W7 = ?





0/5 (0 vote)
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.