Windows 8 stop or start services from the command line

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.

Wige

Posted 2013-05-14T14:17:45.677

Reputation: 121

Answers

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

magicandre1981

Posted 2013-05-14T14:17:45.677

Reputation: 86 560

1Then of course Net Start to restart the service. – EBGreen – 2013-05-14T14:39:14.937

yeah, forgot to add this. – magicandre1981 – 2013-05-14T17:48:10.340

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.

Tanner Faulkner

Posted 2013-05-14T14:17:45.677

Reputation: 11 948

1Powershell is King! – MDT Guy – 2013-05-14T17:49:54.190

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.

user47978

Posted 2013-05-14T14:17:45.677

Reputation: 11