You want to install these into the GAC. Aaron and I have been working on install / uninstall scripts for use during development which can be run from the command line (with admin privileges) to (a) install the assembly into the GAC and (b) register the app with Windows Media Center. These assume you are in the same root Visual Studio solution folder and you have the GACUTIL tool installed (available from a variety of places, not the least of which is the .NET Framework SDK).
Install.bat
-----------------------
REM Usage: Install.bat [Debug|Release] [NameOfDllWithoutExtension]
@ECHO OFF
if %1 == "" goto exit
if %2 == "" goto exit
if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto x86
:x64
"%ProgramFiles(x86)%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i bin\%1\%2.dll
goto register
:x86
"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i bin\%1\%2.dll
goto register
:register
%windir%\ehome\RegisterMCEApp.exe Register.xml /allusers
:exit
Uninstall.bat
-----------------------
REM Usage: uninstall.bat [NameOfDllWithoutExtension]
@ECHO OFF
if %1 == "" goto exit
%windir%\ehome\RegisterMCEApp.exe Register.xml /u /allusers
if "%PROCESSOR_ARCHITECTURE%" == "x86" if "%PROCESSOR_ARCHITEW6432%" == "" goto x86
:x64
"%ProgramFiles(x86)%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u %1
goto exit
:x86
"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /u %1
goto exit
:exit
-----------------------
Technically speaking, you can copy into the %windir%\ehome folder and run from there without installing to the GAC. We don't recommend this approach for several reasons, some of which are...
- This folder is a Microsoft folder and there is no telling what we (might) do to files contained therein -- you might get squashed at some point inadvertently -- I'm not sure of the System File Protection policies on this folder, but you don't want to risk it with your app.
- It's common practice to place your experience in a unique location distinguishable from all others using %programfiles%\[Company]\[Application]\.
Note you can't redist GACUTIL -- Windows Installer technologies can take care of registering your components in the GAC, so you don't need to redist. Aaron (a swami guru when it comes to setup) is working on some things for the SDK to help you get an installer working properly.
Charlie Owen (Microsoft)