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

Jerold Schulman

December 12, 2006

1 Min Read
ITPro Today logo

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 offif {%1}=={} @echo Syntax TabletPC YorN&goto :EOFset %1=Nsetlocalif /i "%OS%" NEQ "Windows_NT" endlocal&goto :EOFset XP=Nfor /f "Tokens=*" %%x in ('REG QUERY "HKLMSoftwareMicrosoftWindows NTCurrentVersion" /V CurrentVersion^|find "5.1"') do ( set XP=Y)if "%XP%" EQU "N" endlocal&goto :EOFendlocalfor /f "Tokens=3" %%a in ('REG QUERY HKLMSYSTEMWPATabletPC /V Installed^|Find "0x1"') do ( set %1=Y)


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like