Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo OFF
- color 1F
- title Tablet Service Restart
- :: BatchGotAdmin
- :-------------------------------------
- REM --> Check for permissions
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- REM --> If error flag set, we do not have admin.
- if '%errorlevel%' NEQ '0' (
- echo Requesting administrative privileges...
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- set params = %*:"="
- echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- del "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- pushd "%CD%"
- CD /D "%~dp0"
- :--------------------------------------
- echo This will restart the TabletInputService in order to make your
- echo tablet work.
- echo -------------------------------------------------------------------
- echo Step 1
- echo -------------------------------------------------------------------
- echo Stopping Tablet Services...
- echo.
- net stop TabletInputService
- echo.
- echo.
- echo -------------------------------------------------------------------
- echo Step 2
- echo -------------------------------------------------------------------
- echo Stopping Tablet Services...
- echo.
- net start TabletInputService
- echo.
- echo.
- echo -------------------------------------------------------------------
- echo Tasks completed. Tablet Input Service has been restarted.
- echo -------------------------------------------------------------------
- echo This window will close when you press a key.
- echo.
- echo.
- pause
- REM
- REM
- REM
- REM
- REM
- REM
- REM
- REM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement