It has been a while since I’ve created anything small and useful for the community. This time the XBMC for Windows is the new “it” for me. The time of HD-movies is here and the HTPC boxes are growing beneath the TV-sets and here is a simple solution for getting the XBMC as a “shell”.
First of all I would like to say thank you to ritchiethebrit at GameEx for his InstantSheller. If the site is down, then download it from me here
The InstantSheller will set your HKEY_CURRENT_USER \Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell from blank (meaning use the default explorer.exe) to something else + it will make you able to customize your boot-loading screen, removing cursors etc. Simple, plain and easy! 🙂
The only problem with replacement of the shell is that parameters cannot be included. Meaning that you need some kind of launcher and that is where the SilentLaunch comes in. It will start a list of programs based its config %homedrive%\SilentLaunch.cfg and here you can include your params and launch order.
Downloade SilentLaunchv2 (exe)
Download SilentLaunchv2 Source code (created with Visual Studio 2010 c++ win32)
Download SilentLaunch
Download SilentLaunch Sourcecode (created with Visual Studio 6.0 c++ win32)
Usage
1. Create a blank text-file on you C:\ drive called “SilentLaunch.cfg”
2. Add your applications you want. (Remember to put ” around paths that contains spaces!) add params after that.
3. Test your application by running it with a “-v” argument that will verbose the steps.
Example of SilentLaunch.cfg (one line = one action)
%systemroot%\system32\calc.exe
%systemroot%\notepad.exe %systemroot%\win.ini
c:\doesnotexists.exe
"c:\program files\someapplication.exe"
"c:\program files\xbmc.exe" -fs -p
This configuration will try to launch 5 applications when SilentLaunch is triggered.
Please note that %systemroot% usally doesn’t have spaces in it variable, but %programfiles% does (eg c:\program files)
If you try to launch anything from that you need quotes (“) around it, eg: “%programfiles%\XBMC\xbmc.exe” -fs -p
Take each variable you have in the config-file and test it in the commandprompt (Start -> Run -> cmd.exe) and check if it starts as it should, the returncodes from the system is equal SilentLaunch
The enviroment variables only work with v2 of SilentLaunch
Setup with InstantSheller
Note: Please test you config before you set it as shell in instantsheller!
Just place the SilentLaunch.exe where ever you like, for instance c:\SilentLaunch.exe. Then run the InstantSheller and make the C:\SilentLaunch.exe as your “Application to shell”.
Help nothing is showing up
You did test the config didn’t you? 🙂
Press CTRL+LSHIFT+ESC to get the taskmanager up, then press File -> Run enter “Explorer.exe” and you’ll get a explorer window to browse.
If you encounter other problems, please use Instantsheller to undo back to default shell (using method above), fix the problem and try again.
Returncodes in verbose mode
00 = “The operating system is out of memory or resources.”.
02 = “The specified file was not found”.
03 = “The specified path was not found.”.
05 = “The operating system denied access to the specified file”.
08 = “There was not enough memory to complete the operation.”.
10 = “Wrong Windows version”.
11 = “The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).”.
12 = “Application was designed for a different operating system”.
13 = “Application was designed for MS-DOS 4.0”.
15 = “Attempt to load a real-mode program”.
16 = “Attempt to load a second instance of an application with non-readonly data segments”.
19 = “Attempt to load a compressed application file”.
20 = “Dynamic-link library (DLL) file failure”.
26 = “A sharing violation occurred.”.
27 = “The filename association is incomplete or invalid.”.
28 = “The DDE transaction could not be completed because the request timed out.”.
29 = “The DDE transaction failed”
30 = “The DDE transaction could not be completed because other DDE transactions were being processed.”.
31 = “There is no application associated with the given filename extension.”.
32 = “The specified dynamic-link library was not found.”.
OTHERWISE = “undocumented”.
Really off topic for programmers only
I encountered an error while compiling this program in release mode. The errors where:
Linking...
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
Microsoft had the solution and it can be found here: http://support.microsoft.com/?id=894573
Basically you need to add the “bufferoverflowU.lib” library to the release mode to include the “security cookie” variables. This could be useful to others, please let me know 😉
Note: The bufferoverflowU.lib function isn’t needed in Visual Studio 2010! 🙂
One major problem I’ve run into. Using SilentLaunch stops my MCE remote from working. Is there anything I can do to make this work or do I need to go to EventGhost?
I dunno what the problem is, since the MCE works great on my computer.
But if you have a backgroundservice of some kind managing the MCE-remote, check it that is running.
(Remember that when replacing a shell, then everything in the “Run” and “RunOnce” part in registry are never triggered. You have to add them yourself to the run-command).
Also check this option, to ensure it isn’t disabled: http://www.ehow.com/how_6304199_disable-media-center-remote-control.html
You could also try to add: net start (or stop) Intelliservice if you have extra software managing the remote through 3rd-party software.
Setting up a HTPC is alot of config, trial&failure etc… You could eg start Eventghost from SilentLaunch, since the silentlaunch is just simple start-replacement for the system.
Hi large
Is it possible to remove or stop the black DOS box that pops up after login?
Thanks for the great app. With InstantSheller it’s really added to the true HTPC Appliance experience on Windows 7.
Hi Matt, if you add “start ” before the app you want to start, then the box will just blink.
If you want to remove it 100% you have to use a VB-script and wscript.exe to run it.
I never intended to disable “normal console behaviour” like not showing windows, but maybe I’ll add “hide” on it in the future 🙂
Hi there
I have installed everything and when I try the “-v” test it gives me the error:
“capplication::create() failed – check log file and that it is writable”.
The Xbmc doesn´t start.
What does it meen? What am I doing wrong?
Thank you
Could you post the config-file, and the result from “-v” option
The Silentlaunch has been updated to v2, please download it here
New features:
* Enviroment variables, like %systemroot%, %programfiles%
* Configfile is based on %homedrive% and not hardcoded to C:\
* Recompiled using Visual Studio 2010, c++, win32. Source code available!
SilentLaunch could be used to replace a shell and usally a HTPC box with XBMC, Boxee or similar can take advantage of this!
If you need help setting it up, just post a comment!
Maybe I am missing something huge here but the zip file comes up as corrupt. I cant open it in any major archive program. The source opens and I beleave that the .exe in the release folder is the filan version but I cant get anything from it. I have it and silentlaunch.cfg in c:/ but when run none of the apps start.
Hi Joe
Since you mentioned the “Release” folder I guess you have downloaded the sourcecode.
Please use this one: http://lars.werner.no/wp-content/uploads/2008/09/silentlaunch.zip
There is an example of the cfg-file above and the version above should give the result you want.
I keep getting an error that I cant find any info on. when I ran with -v it comes up with failed with code 2 when trying to start XBMC. Any Idea what code 2 is?
Never mind, I found it. It wont accept variables. Like %systemroot%
Hi Joe
You have absolutely right!
I wonder why I have forgotten to add environment functions, I’ll upload an updated version later on 🙂
I had a problem and couldn’t figure out how to undo the changes done by SilentLaunch and InstantSheller.
To UNDO THE CHANGES:
ctrl-alt-delete
File>New Task
Type: Explorer.exe
Navigate to InstantSheller.exe, wherever you extracted it to.
UNDO CHANGES!
I don’t have a quick solution for you on that one… The script launches using the ShellExecute function and I don’t have any controll on that one.
If you try to make a vbs-script though and use the “start XBMC.exe” function you might get it to run without console. Example here: http://wsh2.uw.hu/ch07e.html
Picking up Fidoboys question: Is there a chance to hide the ugly console window? I/we mean the window of silentlaunch which pops up in front. it is shown only for about a second, but it still is ugly 😉
anyway, nice work so far! thank you 🙂
Sorry nooby, but the C:\ is hardcoded… If you don’t have a C:\ then create a network share and call it C:\.
Read guide here: http://www.ofzenandcomputing.com/zanswers/26 and replace the computer-name with the own computer
Hi,
it seems, SilentLauncher looks for the .cfg exclusively on C:\.
Unfortunately, my system partition is H:\. Is there a way to make SL look on H:\ or will I have to reinstall my whole system (oh my god!:) )?
I tried to use instantsheller with xbmc but how do you return from this mode to explorer if you want to fix something within windows . Instantsheller itself worked fine for me but I had to install windows all over again to fix another problem . What’s the trick ?
Didn’t realise it wasn’t 64bit compatible. Must have missed that. Oh well.
Thanks for your help.
I don’t think Instantsheller support 64bit systems. You should try todo it manually as described below on the Instantsheller homepage.
If you are going to use emulators ect you also might get in trouble because of the 64bit system.
Hi,
I’m running Vista (64bit).
I’ve enable show all files, but still no joy. 🙁
FatBoy:
What OS are you using?
Please check you systemdrive (usally C:\) for the boot.ini. You probably need to enable showing system files
I have followed the SilentLaunch instructions, but when I set â??Application to shellâ? and click on ‘I am ready’, I get a ‘Cannot Find boot.ini’ error.
Any ideas what I’m doing wrong?
Thanks
I was talking about the console window for SilentLaunch itself. When SilentLaunch is executed it shows a console window… can’t it be hidden?
regards
If you have programs that does not release then use start “ params”
Hello Lars,
I’ve just downloaded SilentLaunch but i’ve found a little annoying issue. Can u please, modify it to hide the cosole window when the app is executed? It could be very useful and nice….
many thanks for your work, regards,