Skip navigation

Q. How can a script determine if Windows XP Tablet PC Edition is installed?

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
for /f "Tokens=*" %%x in ('REG QUERY "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /V CurrentVersion^|find "5.1"') do (
 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
)


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish