Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wpf spawns unwanted wisptis.exe

Tags:

wpf

touch

Hello community I hope all is well. I was wondering if someone could educate me on the following matter.

If I was to turn off the "Tablet PC Input Service" this would render touch and stylus functionality. However, when I launch a sample wpf application (From creating a brand new wpf project), it reenables touch and styles functionality. Using process explorer I see this WPF application spawns a process called "wisptis.exe" which happens to be windows screen and touch process.

My question. Is there a way for me to programmatically stop WPF from spawning it's own "wisptis.exe"?

Thanks,

like image 998
DoubleDunk Avatar asked Feb 17 '23 05:02

DoubleDunk


1 Answers

I posted these instructions to the god-awful Microsoft forums to help anyone who just hates having unneeded junkware running all the time, but it should work for your purposes as well. The trick is to leave the file in place but prevent Windows from running it -- and you can do this by removing the Execute permission from the file. With a little digging you could probably figure out how to do this programmatically, although for obvious reasons I'd recommend against doing this to other people's machines during install (if your program is something deployed elsewhere).

Permissions are adjusted using ICACLS, which is available beginning with Windows 7. (CACLS and the much older ATTRIB cannot change the Execute permissions, which is all we need to change here.)

You'll see the TAKEOWN command in the instructions. At some point Microsoft decided you were just a visitor on your computer -- Windows "owns" this file so you will normally not be able to change permissions on the file, so the first step is to take ownership of it. The ICACLS program can also set ownership but TAKEOWN is actually easier to use if you, the logged-in user, are the intended owner, which is the case here.

Your user account must have admin rights to perform this task. Open a command window (press Win-R, type "cmd" and hit Enter). Type each of these commands and hit enter after each one:

%systemdrive%
cd %windir%\system32
takeown /f wisptis.exe
icacls wisptis.exe /deny "NT AUTHORITY\SYSTEM":(RX)

Then reboot. Poof, it's gone, and Windows won't be able to run it (although you can, if you really want to for some reason).

If you ever wish to restore the permissions, run ICACLS with /grant instead of /deny.

Note that the actually-useful Windows Snipping Tool requires wisptis, for some harebrained reason. I use it often enough that I used to keep a shortcut on my task bar. Now I keep a shortcut to the awesome free image editing tool, IrfanView, which can perform arguably superior image capture with a command line. Google for all the options, but I use "/capture=4" which starts IrfanView in the capture mode for selecting a specific area.

like image 147
McGuireV10 Avatar answered Feb 27 '23 10:02

McGuireV10