For PS CC 2014 and above version
1. In the "Tablet Setting"
Enable the "Support Tablet PC" options in the "Tablet 1" page.
2. Create a text file
Named as: PSUserConfig.txt
Content of the text file :
#Use WinTab
UseSystemStylus 0
2. Move the "PSUserConfig.txt" into the folder of "Adobe Photoshop CC 2017 Settings" (assume you're running the CC 2017)
C:\Users\[User Name]\AppData\Roaming\Adobe\AdobePhotoshop CC 2017\Adobe Photoshop CC 2017 Settings
3. After setting, please select the bottomas below.