2

I have a touch screen Windows 8 laptop, which has a touch screen keyboard that constantly shows up when I am working in metro apps. Is there a way to stop a service (specifically "Touch screen keyboard and handwriting panel" service) from the command line?

I know I can permanently stop the service from the service manager, but I am hoping to find a solution wherein I can create a shortcut to disable it, and another to re-enable it if needed.

0

3 Answers 3

3

Using PowerShell you can run the command Stop-Service or Start-Service. If you wanted to toggle between the two...

$service = Get-Service TabletInputService
if($service.status -eq "Running") {Stop-Service $service} else {Start-Service $service}

Drop that in PowerShell ISE and save it as a .ps1 and you should have a quick shortcut to alternate the service's state. I don't remember if writing your own script requires you to monkey with Set-ExecutionPolicy, but you may have to loosen some restrictions to get the .ps1 to run without griping.

1
  • 1
    Powershell is King!
    – MDT Guy
    Commented May 14, 2013 at 17:49
3

you can stop services via

net stop <servicename>

from a command prompt with admin rights

So in your case:

net stop TabletInputService

and to start the service run this:

net start TabletInputService
2
  • 1
    Then of course Net Start to restart the service.
    – EBGreen
    Commented May 14, 2013 at 14:39
  • yeah, forgot to add this. Commented May 14, 2013 at 17:48
0

I use a toggle shortcut. Save this to a .bat file in a safe place. Make a shortcut to it. Open properties, press advanced, tick "Run as administrator". Them move the shortcut somewhere convenient like the start menu.

for /F "tokens=3 delims=: " %%H in ('sc query "TabletInputService" ^| findstr "        STATE"') do (
  if /I "%%H" NEQ "RUNNING" (
    echo "enabling,"
    sc config "TabletInputService" start= demand
    sc start "TabletInputService"
  ) ELSE (
    echo "disabling,"
    sc config "TabletInputService" start= disabled
    sc stop "TabletInputService"
  )
)

Its ugly though. If only we could control windows with javascript.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .