When calling a batch script from within another script, be sure to use the
call qualifier.
Otherwise. What kind of error messages are being returned?
When in doubt always log the output for analysis "ex post facto"
@if not defined debug echo off
@echo Load the Dell HAPI Driver... > %temp%\TmpChk.log
Call %~dps0HAPIx86\HAPIInstall.bat
@echo Test for TPM Activiation... >> %temp%\TmpChk.log
%~dps0cctk.exe --tpmactivation >> %temp%\TmpChk.log
find /i "tpmactivation=activate" %temp%\TmpChk.log && (
@echo Found TPM >> %temp%\TmpChk.log
goto :EOF
)
@echo ACtivate TPM ... >> %temp%\TmpChk.log
"%loc%ConfigBios.exe" >> %temp%\TmpChk.log
EXIT 3010
From: [email protected] [mailto:[email protected]]
On Behalf Of Murray, Mike
Sent: Monday, September 29, 2014 2:48 PM
To: [email protected]
Subject: [MDT-OSD] OptiPlex 9020s - BitLocker TPM Security Not Being Set by
Task Sequence
Hello,
When we try to enable TPM in our task sequence on the 9020, it does not
work. However, it will work if we open a command prompt in WinPE and run the
highlighted commands below. The script below is what we are running in the
TS, but won't seem to work. Any ideas?
-----------------
@ECHO OFF
CLS
:paths
SET loc=%~dp0
:HAPI
REM Load the Dell HAPI driver...
"%loc%HAPIx86\HAPIInstall.bat"
:check
REM Check to see if TPM is already activated. Assumes HAPI already
installed...
"%loc%cctk.exe" --tpmactivation | find /i "tpmactivation=activate"
IF %errorlevel%==0 (EXIT 0) ELSE (ECHO Will try to activate TPM...)
:activate
REM Run the cctk standalone executable that configures the BIOS and
reboot...
"%loc%ConfigBios.exe"
EXIT 3010
:end
-----------------------
Best Regards,
Mike Murray
Desktop Management Coordinator - IT Support Services
California State University, Chico
530.898.4357
<mailto:[email protected]> [email protected]