Using REG.EXE, built into Windows XP, Windows Server 2003, Windows Vista, and later operating systems, or installed from the Windows 2000 Support Tools, I have scripted TabletPC.bat to determine if the PC it is running on has the Windows XP Tablet PC Edition installed.

The syntax for using TabletPC.bat is:

\[call\] TabletPC YorN

Where YorN is a call directed environment variable that will contain a Y if Windows XP Tablet PC Edition is installed, or an N if Windows XP Tablet PC Edition is NOT installed.

TabletPC.bat contains:

@echo off
if \{%1\}==\{\} @echo Syntax TabletPC YorN&goto :EOF
set %1=N
setlocal
if /i "%OS%" NEQ "Windows_NT" endlocal&goto :EOF
set XP=N
<font size="1">for /f "Tokens=*" %%x in ('REG QUERY "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /V CurrentVersion^|find "5.1"') do (</font>
 set XP=Y
)
if "%XP%" EQU "N" endlocal&goto :EOF
endlocal
for /f "Tokens=3" %%a in ('REG QUERY HKLM\SYSTEM\WPA\TabletPC /V Installed^|Find "0x1"') do (
 set %1=Y
)