It took me a while to figure out something that is actually very simple and logical… I couldn’t get the different parts of the Remote Server Administration Tools (RSAT) enabled by command-line on Windows 7 x64… On Windows 7 x86 it’s pretty straight forward, as it can be done with the default DISM commands. But on Windows 7 x64 it is kind of hard to get it to use the correct version of DISM.
This is all because the ConfigMgr client is 32-bit application and whenever a 32-bit application wants to access %windir%\System32, it will be redirected to %windir%\SysWOW64. I tried everything, even specifying the whole path to the DISM executable, but it all didn’t matter… Until I finally figured out that there is just something called SysNative. WOW64 recognizes SysNative as a special alias used to indicate that the file system should not redirect the access. As it was kind of hard to find this information I will post my solution here to install RSAT and enable some features. This is the batch-file I ended up:
REM ======================================================
REM SET DISM Directory based on OS Architecture
REM SET RSAT Version based on OS Architecture
REM ======================================================IF EXIST %WINDIR%\SysNative\dism.exe (
set DISM=%WINDIR%\SysNative\dism.exe
set RSAT=amd64fre_GRMRSATX_MSU
) ELSE (
set DISM=%WINDIR%\System32\dism.exe
set RSAT=x86fre_GRMRSAT_MSU
)REM ======================================================
REM RUN WUSA to install RSAT
REM ======================================================
wusa.exe %~dp0%RSAT%.msu /quietREM ======================================================
REM RUN DISM to enable features
REM ======================================================%DISM% /online /enable-feature /featurename:RemoteServerAdministrationTools
/featurename:RemoteServerAdministrationTools-Roles
/featurename:RemoteServerAdministrationTools-Roles-HyperV /quietREM ======================================================
REM EXIT Errorlevel
REM ======================================================EXIT /b %errorlevel%
The first part of the batch-file set the variables based on the architecture and the second part will do the actual installing and enabling (in the example it will enable the Hyper-V manager). To conclude this story, follow the next five steps to install and enable Remote Server Administration Tools with ConfigMgr 2007:
- Download the full installer(s) of Remote Server Administration Tools (amd64fre_GRMRSATX_MSU.msu and/ or x86fre_GRMRSAT_MSU.msu) here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=en.
- Copy the code above and create a batch-file.
- Create a new Package in ConfigMgr 2007 (Site Database > Computer Management > Software Distribution > Packages) and point the Data Source to the location where the installer(s) and the batch-file are.
- Create a new Program with the newly created package and use as command-line the name of the, just created, batch file.
- Create a new Advertisement of the newly created program and it is all ready to install and enable!
More information about File System Redirector: http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx