I finally figured this out and thought I'd supply the solution here. If any of you are trying to do similar things with DISM from SCCM you are likely running into the same problem.
The problem is that these processes are running in a WOW64 session and therefore launch the 32-bit version of DISM (from %windir%\system32). If you are operating on a 64-bit OS you'll receive an error indicating that the 32-bit version of DISM cannot service a 64-bit OS (which you aren't seeing because it's running silent).
The solution is to deliberately launch the 64-bit DISM from the SysNative folder (which only exists as a junction within a WOW64 session).
I imagine the new version of SCCM 2012 will get around this issue as I believe it has a 64-bit agent. Nonetheless, if you're running some other deployment tool that launches as a 32-bit process this is how to get around it. I actually discovered this while troubleshooting a similar issue with pkgmgr.exe, which behaves the same as dism in this respect.
Modified code below:
' Install RSAT and add features with DISM
' 6-4-2012 - D. Akins
' ------------------------------------------------------------------------------
Option Explicit
Dim objShell, strScriptDir, strCmd, q, nBits, objFSO, strAdminToolsPath, strDismEXE
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
' This gets the directory that the script resides in
strScriptDir = objFSO.GetParentFolderName(WScript.ScriptFullName)
q = chr(34)
' Launch WUSA with correct MSU update file for OS architecture
nBits = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth
If nBits = 64 Then
strCmd = "wusa " & strScriptDir & "\Windows6.1-KB958830-x64-RefreshPkg.msu /quiet /norestart"
Else
strCmd = "wusa " & strScriptDir & "\Windows6.1-KB958830-x86-RefreshPkg.msu /quiet /norestart"
End If
'wscript.echo "Launching Command: [" & strcommandline & "]"
objShell.Run strCmd,1,True
' Add RSAT features (same as Control Panel, Programs and Features)
If nBits = 64 Then
strDismEXE = "C:\Windows\SysNative\dism"
Else
strDismEXE = "C:\Windows\System32\dism"
End If
strCmd = strDismEXE & " /online /quiet /enable-feature /featurename:RemoteServerAdministrationTools " _
& "/featurename:RemoteServerAdministrationTools-Roles " _
& "/featurename:RemoteServerAdministrationTools-Roles-AD " _
& "/featurename:RemoteServerAdministrationTools-Roles-AD-DS " _
& "/featurename:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns " _
& "/featurename:RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter " _
& "/featurename:RemoteServerAdministrationTools-Roles-AD-Powershell " _
& "/featurename:RemoteServerAdministrationTools-Features " _
& "/featurename:RemoteServerAdministrationTools-Features-BitLocker"
'WScript.Echo "Command: [" & strCmd & "]"
objShell.Run strCmd,1,True
' Delete AD-related shortcuts from Administrative Tools Start Menu
strAdminToolsPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools"
DelIfExist(strAdminToolsPath & "\Active Directory Administrative Center.lnk")
DelIfExist(strAdminToolsPath & "\Active Directory Domains and Trusts.lnk")
DelIfExist(strAdminToolsPath & "\Active Directory Module for Windows PowerShell.lnk")
DelIfExist(strAdminToolsPath & "\Active Directory Sites and Services.lnk")
DelIfExist(strAdminToolsPath & "\Active Directory Users and Computers.lnk")
DelIfExist(strAdminToolsPath & "\ADSI Edit.lnk")
Function DelIfExist(strFile)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strFile) Then
objFSO.DeleteFile(strFile)
End If
End Function