Hi all!
Note: This thread describes the Windows Vista version of my add-ins!(See here for the "old" xpMCE 2005 version.)
There's a number of MCE add-ins I've been writing for my own use, some of which I've published on the German MCE-Community site HERE. Since there's been some interest in an English version, I thought I'd publish it here too.
Some of the add-ins are more useful, some less. Please remember that this is a hobby project. The add-ins do not come in a fancy installer, so you will have to unzip, copy/move files and edit config files manually...
The add-ins come in form of two DLLs which both are required. However, you can decide for yourself which of the add-ins in the DLLs to activate on your system and which not.
Add-Ins Currently In the DLLs:
The following describes the general installation of the add-in package. I'll then follow up (over time) with more postings in this thread with a more detailed description of each of the features.
Installation
Precondition: For the DLLs to work, it is necessary to have the J# Redistributable Package Version 2.0 installed, available from Microsoft:
https://www.microsoft.com/downloads/details.aspx?familyid=F72C74B3-ED0E-4AF8-AE63-2F0E42501BE1&displaylang=en
To check if you already have the J# 2.0 redistributable, check the installed software (via the Control Panel) and look for "Microsoft Visual J# 2.0 Redistributable Package". (Do not confuse with a similar package for 1.1 or others, which you may also have installed.)
Now, for the actual installation, download the JHTAddIn.zip file which contains the add-in.
Unfortunately, I can't upload files to the Green Button, so I have to rely on other Media Center communities to make this file available to you:
or
Unzip the file into any suitable folder (called "install folder" below).
In the install folder, you'll find two DLL files called JHTAddIn.dll and JHTAddInUtil.dll. You need to copy both of these files into your ehome folder in the Windows folder (usually C:\Windows\ehome).
Now you have the DLLs in place, so what's left is to register (activate) those add-ins from the DLLs that you are interested in:
For each add-in, you'll find a matching regADD_IN_NAME.cmd file in the "reg-unreg" subfolder of the installation folder which you can use to register the add-in with MCE (and also a matching unregADD_IN_NAME.cmd file for unregistering it again). These registration/unregistration command files must be run with administrator privileges, i.e. if you are not logged in as an administrator anyway, it is simplest to right-click on the file you want to run and then select "Run as administrator" from the popup menu. When registering an add-in, you are also asked which language you want: 1=German, 2=English.
See the following postings in this thread for more information about which registration file to use for which add-in. You may also have to edit the add-in config file to supply further settings for a specific add-in. More about this later.
Finally, after registering all add-ins you are interested in, you need to restart MCE.
Note: You can always "activate" further add-ins from the package, or "deactivate" some with this process (see also "Uninstall" below). Simply execute the matching CMD file and then restart MCE.
Uninstall
If you only want to stop using a certain add-in from the package, simple execute the matching unregADD_IN_NAME.cmd file (and restart MCE), again with administrator privileges.
If you want to uninstall the whole package and all add-ins in it, do so here:
Update with a new Version
I recommend to first unregister all add-ins of the old version, then delete the old install folder (but keep the old config file!), then install the new version, then register the add-ins of the new version you are interested in, then transfer your settings from the old config file (or the whole file) to the new install folder, like this:
Finally...
If you use my add-ins and like them, I would be happy about any feedback (probably also if you don't like them! ;-)
If there are any problems, don't hesitate to ask.
Please see the following postings for the descriptions of the individual add-ins. (Work in progress, I'll make these postings over time.)
Doc________________________________________________________
Update History:
Update "26 Apr 2007": New add-in "Slideshow Composer" added.
Update "25 Mar 2007": Additional features in the MCE-Message add-in.
Main Background Add-In
(This add-in is activated by running regMainBackgroundAddIn.cmd and deactivated by running unregMainBackgroundAddIn.cmd. Once the add-in is activated, any of its individual sub-features can be activated/deactivated via the config file. Once the add-in is deactivated, all its sub-features are deactivated too. For general installation instructions of the add-ins, please read the first posting in this thread!)
This add-in is a background add-in which means that it is started together with MCE and remains active in the background (but usually doesn't do anything and doesn't use CPU-time, unless its features are accessed).
The add-in contains several sub-features which can be activated or deactivated via a config file. Also in the config file you can specify further settings for some of the sub-features. For details on how to activate/deactivate and configure each sub-feature, please see the corresponding posting further below for each sub-feature.
The config file is called jhtAddIn.properties and is located in the install folder. It can be edited with any text editor (like Notepad). After a change in the config file it is enough to restart MCE to make the changes active (an additional execution of regMainBackgroundAddIn.cmd is not necessary if only jhtAddIn.properties is edited).
The add-in contains the following sub-features:
See below for explanations of the individual sub-features.
Timeshift-Buffer Backup
This feature is a sub-feature of the main background add-in which must be activated for this sub-feature to be available. Therefore, please do also read the posting about the main background add-in above. For a general installation description please read the first posting in this thread!
This sub-feature of the main background add-in allows you to back up the accumulated MCE timeshift-buffer while watching live TV, which will then appear like a normal recorded show.
To activate this feature, the config file jhtAddIn.properties must contain this line:
timeshiftBufferSave=true
Once the feature is running you can activate it at any time while watching live TV in full screen mode simply by pressing Left-Right-Left-Right on the remote in quick succession (LRLR), i.e. the "left" and "right" arrow buttons on the remote.
Note the difference to the "old" timeshift-buffer backup add-in for MCE 2005: Back then the trigger key-combination used to be "3x-Left", which I have now changed to Left-Right-Left-Right.
Shortly after you'll get a dialog which asks you if you want to back up the timeshift-buffer or not.
If you choose "No" then nothing further will happen (which is also the case if the dialog closes automatically after a while).
If you choose "Yes", the buffer-backup is started, with the following steps:
(Note: While the following may look complicated at first glance, it is actually quite simple to use, as each dialog will tell you what will happen or what you are supposed to do - the whole process is quite self-explanatory and not really difficult to understand or use.)
Once the process is completed, the buffer backup recording will be available in your normal "Recorded TV" list in MCE, just like a normal recorded show. The recording will have the name Live-TV and the subtitle will be the date and time for the time-span of live-tv contained in the recording.
The recording will be stored in a normal DVR-MS file and can be handled like any other recording (watched, deleted, processed to MPEG or with DCut or whatever).On disk, the file will be located in a subfolder called "TimeshiftBuffers" located in your normal TV-recordings folder.
BTW: The timeshift buffer backup will contain the whole accumulated buffer since you have started watching live-TV, including all channel switches (up to the maximum length of the buffer).
That means that the add-in is also useful in one of those ugly situations where you are watching live-TV and then pause/stop for a while (or rewind) and from then on you watch TV from the buffer, i.e. you are "behind" in time. If in this situation you accidentially switch channels, then normally the part in the buffer that you have not watched yet would have been lost, because once you switch back to the correct channel, you will see the "current" live-TV and rewinding into the past is not possible anymore. With the add-in, you can now trigger a buffer backup and thus gain access to the part of the buffer before the accidential channel switch.(I explained this in more detail HERE.)
Advanced Configuration: By default, the add-in assumes that the timeshift-buffer files are located in their default folder, which is the subfolder "TempRec\TempSBE" of the default TV-recordings folder (the location of the default TV-recordings folder is in turn read from the Windows registry).If however the buffer files are located in a different folder (for example if you have configured the TV-recordings folder to be located on a shared network drive, but have left the temp-folder on the local computer, or if you are using a junction in the file system to have the recordings- and temp-folders on different disks or partitions), then you need to tell the add-in the path to the temp-folder by adding the following entry to the jhtAddIn.properties config file:
timeshiftBufferTempSBEFolder=PATH_TO_TempSBE_FOLDER
where PATH_TO_TempSBE_FOLDER is to be replaced with the path of the folder where the temporary buffer files (the files with names like "SBE*.tmp") are located on your system. (In the config file, remember to use "\\" or "/" instead of the normal "\" in the path!)
MCE-Message
This sub-feature allows other processes (even on a different computer in the network) to show a notification dialog inside of the MCE. This dialog can contain text and optionally a PNG-image and has an OK button. Also, the dialog can either be modal or non-modal and can disappear automatically after a certain timeout.
To activate this sub-feature, the config file jhtAddIn.properties must contain the following line:
remoteCalls=true
To display a message in MCE, use the MCEMessage.exe (which is also part of the ZIP file that contains the add-ins, i.e. you'll find it in the install folder).
MCEMessage.exe can be run either on the Media Center PC itself (in which case the host:HOSTNAME parameter can be omitted, see below) or on any other Windows PC in the network (in which case you need to tell MCEMessage.exe the name of the Media Center PC via the host:HOSTNAME parameter).To successfully run MCEMessage.exe on a PC, the PC must be connected to the Media Center PC via the network (and the necessary ports must be open, see below) and the J# 2.0 Redistributable Framework from Microsoft must be installed on that PC, see here: https://www.microsoft.com/downloads/details.aspx?familyid=F72C74B3-ED0E-4AF8-AE63-2F0E42501BE1&displaylang=en. The PC were MCEMessage.exe is run does not have to be a Media Center PC but can have any Windows version for which the J# 2.0 framework is available.
From a command prompt (or from inside of a batch command file), run the EXE with the following parameters:
MCEMessage TITLE TEXT TIMEOUT MODAL IMAGEPATH host:HOSTNAME
with the following meaning:
BTW, the dialog will be displayed in all currently running instances of the MCE shell, which means that it will be displayed in the actual main MCE shell of the PC (if it is started) and also on all extenders which are currently connected. This works for the main MCE shell plus up to 5 extenders.
Important: The MCE-Message add-in only works if certains ports in the Windows firewall are opened for local access, because MCEMessage.exe talks to the add-in via these ports. The add-in uses the ports 31031 and following, i.e. the first MCE shell that is started (be it the main MCE on the PC or an extender) uses port 31031, the second uses port 31032 and so on.Therefore you need to open these ports in the Windows firewall for the add-in to work. When opening the ports, depending on if you want to run MCEMessage.exe on the same computer or not, you can restrict the opened ports to the local computer or not.If you only have the main MCE (no extender), then you only need to open port 31031. For each extender you have, open an additional port. I.e. for the first extender open port 31032, for the second extender port 31033 and so on (up to 5 extenders).(Hint: Usually Windows Vista will tell you that MCE is attempting to open a port when you start it with the MCE-Message add-in enabled and will ask you if you want to allow this or not. If you allow it, then Vista will usually configure the firewall automatically, so you don't have to bother with opening the ports explicitly.)
Important: Only the MCEMessage.exe from the same ZIP-file as the MainBackground Add-In itself will work correctly with the add-in. Another MCEMessage.exe from a different version of my add-in collection may not work!
OnStartup Execute
This sub-feature allows you to automatically run an external program (or batch file) at each start of the MCE shell.
To activate this sub-feature, add the following two lines to the jhtAddIn.properties config file:
onStartup=trueonStartupCommand=COMMAND
where COMMAND needs to be replaced with the command that is to be executed (including all parameters).
The given command will then be executed once after each start of the MCE shell.
The home folder in which the command will be run will be your ehome folder, i.e. %WINDIR%\ehome. Therefore you may have to supply the full path to the desired EXE file, for example:
onStartupCommand=C:/Sample/MyProgram.exe param1 param2 param3
To run a batch file, execute "cmd.exe" and use the name of the batch file as a parameter (followed by the parameters for the batch file itself). In the batch file, remember to do a "cd PATH" to the correct folder in which your batch file is supposed to work, otherwise it will be working in %WINDIR%\ehome.If you want to close the command line window after the batch file completes, you need to include the "/c" parameter. If the command line window is supposed to remain open include "/k" instead. So usually something liket his:
onStartupCommand=cmd /c C:/Sample/MyBatch.cmd param1 param2 param3
Remember to use "/" or "\\" in paths, not the usual "\"!
OnResume Execute
This sub-feature allows you to automatically run an external program (or batch file) each time the PC wakes up from "Standby" (while the MCE shell is running).
onResume=trueonResumeCommand=COMMAND
The given command will then be executed each time the PC wakes up from Standby, but only if the MCE shell is open.
For more details about the COMMAND, please see OnStartup Execute above.
Slideshow Settings Add-In
(This add-in is activated by running regSlideshowSettingsAddIn.cmd and deactivated by running unregSlideshowSettingsAddIn.cmd. For general installation instructions of the add-ins, please read the first posting in this thread!)
This is a rather simple add-in for a quite trivial use, with the following background:
Frequently I run a slideshow with some of my pictures while MCE is playing music. In this case, I want the pictures in random sequence, with animations and relatively quickly after each other.Every now and then however I also watch (or show) a "real" slideshow, for example with vacation pictures. In this case I do of course not want a random sequence and usually also no animations and a longer interval for each picture.
In this situation I was annoyed that for getting to the "Slideshow Settings" page, I always have to go via "Info/i-Key -> Settings -> Pictures". (I'm not sure if this are the correct names on an English MCE, but I guess you understand what I mean...)
So I created this add-in as a shortcut: If a picture folder is selected in MCE and you press "Info/i" on the remote, then the popup menu will contain an additional "More..." entry. If you select it you go to a "More..." page where you will find an icon for "Slideshow Settings". Now click this icon and you will go directly to the slideshow settings page where you can adjust randomness, animations and speed (and other settings).
I know: It's not rocket science, but it's a shortcut that saves me a few key-clicks on the remote to get to the page I want, and since it's part of the DLL anyway, I thought I might just as well describe it here too.
TV-Archivation Add-In
(This add-in is activated by running regTVArchiveAddIn.cmd and deactivated by running unregTVArchiveAddIn.cmd. For general installation instructions of the add-ins, please read the first posting in this thread!)
Background: I wrote this add-in to play around with the ListMaker interface which is built into MCE. Normally the ListMaker is meant for assembling media data (recordings, pictures, music) to then be burned on CD/DVD. It is however possible to use the ListMaker for other purposes too, which is what I did. Still, you will see its CD/DVD-burning roots here and there on the add-in pages, which you will have to ignore. Since the add-in was programmed for personal use and as a playground for testing the ListMaker interface, I'm not sure about it's usefulness for others, but I thought I'd describe it anyway...
Please note: This add-in works a bit different than the "old" version of the add-in, for MCE 2005.
Anyway, the add-in has nothing to do with CD/DVD-burning but instead is meant for the situatuation where TV recordings are accumulating in the normal recordings folder and the disk is getting full. You don't want to delete recordings you haven't watched yet but you need to make space on the disk or the upcoming recordings will fail.This is where the add-in may be helpful, to move recordings from the normal recordings folder to a pre-configured archivation folder (on a different disk or partition), but in a way that the details of the archived recordings will still be viewable under "TV + Movies -> Recorded TV", so that you can still browse and select them.
(So actually it's more of a "Move-TV" add-in than a "TV-Archivation" add-in, but the latter just sounds better ).
The add-in can be equally used if the archive folder is located on a disk which is always available (like a second disk or partition) or if it is for example on an external USB-disk which is normally switched off.
The add-in is configured as follows:
You can now move recordings to this archive folder with the help of the add-in (see below for how to use the add-in). Since the archive folder is among the folders which are watched for media files, the moved recordings will still be available under "TV + Movies -> Recorded TV".
Special case "switched off external disk": The entry for the recording under "Recorded TV" will still remain visible even if the archive folder is on an external disk which has been switched off. Of course in this situation it will not be possible to actually play the recording while the disk is switched off, but the entry (usually without a thumbnail though, unless it is still buffered in memory) will still be visible in the recorded TV list. Which means that you will still see what recordings you have available for viewing (and the missing preview thumbnail will conveniently remind you that such an archived recording is located on the currently switched off external disk, i.e. that you need to switch on the disk before you can play the recording).
Using the Add-In
The add-in is available under "Online Media -> Programs" as an icon with the name "TV-Archivation". Just click the icon to start the add-in.
(If after clicking the icon the first page of the add-in does not appear, then this means that the configured archive folder [see above] ist not available. Either there's a mistake in the entry in the config file jhtAddIn.properties, or the external disk, if one is used, may still be switched off.)
The add-in consists of several pages which are made available by the ListMaker interface of MCE, which is why they fit very well into the MCE look & feel:
Note: To be on the safe side in case of any problems, the add-in only deletes the original recordings-file after it has double checked that the copy in the archive folder was correctly written. For this, the add-in compares a checksum of the two files. This makes the archivation process longer, but here I thought it best to err on the safe side.
Thank you for this app. Looks very promising. I am having trouble installing the Main Background Add-in. I followed all of the instructions to the letter and activated the Timeshft-Buffer Backup, but every time I start Vista MCE, I get an error dialog box indicating the Background Add-in has stopped responding. Any idea what the issue could be?
Thanks in advance.
Edit: Update -- got it working. It turns out that I had to change the user access privileges to "full control." Works like a charm now! Microsoft owes you big time for figuring this out.
@Flexx (and others who also have this problem of getting the add-in to work under Vista):
I gather that by "full control" you mean that you had to enable administrator privileges for your account, because the add-in was working only when you were logged in as an administrator (or started MCE as such).
Well, it is probably not a good idea running Vista with an admin account all the time (for security reasons) and I don't want my add-in to be responsible for people setting their configuration to a less secure level than is officially recommended...
However, I may have found the reason for the problem: The add-in attempts to write log-output to the Windows event log. Under xpMCE and under certain Vista configurations this doesn't seem to be a problem. For some Vista users however this seems to have created problems. I have therefore now removed the event log output from the add-in and other users report that it is now working for them. So maybe you want to give it a try too?
If so, then please try this DLL which I uploaded to the German MCE Community:
[EDIT: URL removed]
Simply overwrite the DLL of the same name in the ehome folder with the DLL in the ZIP file behind the above link.
Then try again: The add-in should now (hopefully) also work if you do not have granted admin rights to your Vista account.
Note to all: The offical download release of the add-in does not yet contain this change, i.e. if you download the add-in and it doesn't work (as happens for some users), try out the above DLL to see if this helps. In the next release of the add-in, I will of course include the changes in the official download.
[EDIT: By now I have released a new version of my add-in collection, in which the changed DLL is already included. To avoid version-confusions, I have therefore removed the download-URL link to the changed DLL above. In case you have trouble with the timeshift-buffer save in the old add-in, please do upgrade to the new add-in instead.]
Doc
Update "25 Mar 2007": A new feature in the MCE-Message add-in now allows you to send messages into the Media Center user interface (as a message box) from any Windows computer in your network (not only from the Media Center PC itself).
See the posting about the MCE-Message add-in above for details.
Slideshow Composer Add-In
(This add-in is activated by running regSlideshowComposerAddIn.cmd and deactivated by running unregSlideshowComposerAddIn.cmd. For general installation instructions of the add-ins, please read the first posting in this thread!)
Background: I often use Media Center's slideshow feature, for eaxmple when listening to music, to have changing background images, or of course when I want to view last vacation's pictures, or something similar.
Generally this works well in VMC, the only problem being that it is not possible to individually assemble slideshows in VMC: A show simply always contains all images in a given folder (and its subfolders).Only there often are cases where this is not the desired behavior, which usually fall into one of two categories:
These kinds of shows are not really supported by the current features of VMC:
There's no choice than to create a separate folder for the desired show and copy the corresponding pictures into it. For example with a collection-show you would create a second folder into which you copy only the selected pictures from the original folder. With a collection-show you would also create an extra folder and then collect all the matching flower/kids/whatever-pictures into it, by copying them from the original folders.
The disadvantages are clear:
First, there's no 10-feet interface for this in VMC, so you have to do the copying using mouse and Windows Explorer (desktop).
Second, any picture copied like this will take up twice as much space on the hard disk (or more, if the same picture is supposed to appear in several shows), because usually you want to leave the original picture in the original folder, and not move it to the show folder.
This is where my Slideshow Composer add-in can help:
Now, after this introduction, let me explain how to configure and use the add-in:
To allow the add-in to work, at least one suitable slideshow folder must be created and configured in the jhtAddIn.properties config-file. So:
A pre-configured slideshow is created with the following two entries in the jhtAddIn.properties file:
slideshow_Name_ID=NAME_OF_SHOWslideshow_Folder_ID=PATH_TO_FOLDER
with the following replacements:
You can have as many of these entry-pairs as you need - one pair for each show you want to configure.
As soon as at least one show has been configured (and the add-in itself has been registered), you can start using the add-in:
To start the add-in, go to the picture library. Then select the desired folder or a picture in a folder and press the i/info-key on the remote. In the menu select "More...", which opens the "MORE..." page. On this page you will find an icon for the Slideshow Composer. Click this icon to start the add-in.
If you selected a folder, then the add-in will be started with this folder as the current folder. If you selected an image, then the image's parent folder (in which the image file is located) will be used as the current folder.
The add-in displays all pictures in the current folder as a thumbnail-strip at the top of the screen (see link to screenshot below). The currently selected picture is highlighted in the thumbnail-strip and also displayed in larger size on the screen (and its file name is displayed at the bottom of the screen).
The left area shows the pre-configured slideshows (if there are more than 10 shows, the list is scrollable).
Use the Left/Right-keys (and Program/Channel +/- for paging) to select the current picture in the thumbnail-strip.Use the Up/Down-keys to select the current show in the list of shows.
Click here for a screenshot of the add-in.
At any time, there will always be a current picture and a current show selected. With the OK-key you can then copy the current picture into the current show (as a hard link). To confirm to you that the picture was copied, the large version of the current picture will show a short animation when you press OK.
So copying pictures to various pre-configured slideshows is very simple and quick:
_________________________________________________________
A Few Words About Hard Links
Hard links are a feature of the NTFS file system. The normal Windows Explorer of Windows Vista can not create hard links and does not discern hard links from normal files. Therefore, any copies which are created as hard links in essence look exactly like normal copies (normal files) and can also be used like normal files. Only the copy does not use up any additional space on the hard disk: The hard link is simply a reference to the file data of the already existing file, so no additional space is required.The file system manages all references that point to the data of a file in such a way, that the actual data is only deleted when the last of the references is deleted (be it from the original file or from a hard link that was created later). The file name however is stored in the link, not in the file data, so a hard link copy can have a different name than the original file.To summarize: Hard link copies look and behave just like normal files and can also be treated like normal files:
More or less there is only one issue where you can actually notice that the original file and the hard link copy are actually only two separate references to the same file data, which is when the actual content of the file data itself is manipulated.
In regard to pictures (to stay in the context of this add-in) this means:As described above you can rename, move, copy, delete, etc. both the original file and the hard link copy without affecting the other copy (or the original), unless you change the actual content of the picture file. This content change will then be visible in all hard link copies of this file, since they all reference the same file data.For example, if you open the original picture file in a photo-tool and change contrast or saturation, then these changes will also be visible in all hard link copies (and vice versa). Or if you rotate a picture in portrait-format so that it is the "right way up", then this rotation constitutes a change of the picture data and will thus affect all copies (and the original) too.Often this may even be desired, since such changes of contrast, saturation, rotation, red-eye-reduction or whatever, are usually changes that you want to apply both to the original file and to the hard link copies in the slideshow folders. So in this situation the hard link does not only safe you disk space, but also additional work: No matter how many copies of a picture you made to various slideshows, any changes to the original will be reflected by them.