Windows 10 – Exploring Quick Assist

email me

Microsoft Quick Assist is a Windows 10 app that enables two people to share a computer over a remote connection so that one person can help solve problems on the other person’s computer.

After reading the documentation, I realized there were no configurable features or options.

I’m not sure why Microsoft does this; they create some good tech, and then bog it down with needless extra windows and clicks. At least provide methods to configure the windows.

These are the boxes I don’t want to see

 

THIS IS ALL EXPERIMENTAL 

Perhaps this will help you in your implementation of Quick Assist. Much of this is undocumented, and things I just figured out on my own. If you want the documented portions of Quick Assist, see Demo or FAQs.

How do you get rid of extra windows in Quick Assist, when Microsoft provides no methods or documentation to developers? You ProcMon it…and watch what the app is doing. The two main attributes that helped me control the app were memory utilization and app path. I did tinker with TCP ports for a bit, because QA uses specific ports, but moved on to simpler, faster methods. Note, all code ended up being compiled. If you’d like to look at ports, ProcMon and netstat can help.

* I will also be throwing this into WinDbg and IDA Pro, to see if I can remove the windows via assembly. If I figure that out, I’ll post the code.

 

Killing QuickAssist

wmic /interactive:off process where “name like ‘quickassist.exe'” call terminate


Launch Quick Assist, skipping ‘Give Assistance’

C:\Windows\System32\QuickAssist.exe /Q

Note, /Q can be anything…once  there is a single character after the .exe, the prompt defaults to ‘Enter Code’ (awesome).


Controlling the general flow of Quick Assist

This is how I prevent window 1, and then go on to control windows 2 and 3. Something to think about, not only do you need to prevent the windows from appearing, but you also need to make sure the Pause function continues to work properly.

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
title QuickAssist

:: set path to current directory
cd "%~dp0"

:: VARIABLES
set dynamic=1
set static=1
set numMon=1

:: HOW MANY MONITORS DOES USER HAVE?
for /F %%a in ('wmic path Win32_PnPEntity where "Service='monitor' and Status='OK'" get DeviceID /VALUE ^| find /C "="') do set numMon=%%a
:: kill current quickassist
start /min /b "" killquickassist.exe
taskkill /f /im NoSleep.exe
taskkill /f /im quickassist.exe
wmic /interactive:off process where "name like 'quickassist.exe'" call terminate
timeout /t 1

cls
Echo Launching QuickAssist...

:: LAUNCHES 64BIT PROCESS
start /min /b "" runquickassist.exe

:: RUN NOSLEEP - KEEP MACHINE AWAKE DURING SESSION
:: this is just something extra I added
start /min /b "" NoSleep.exe

:: give quickassist.exe enough time to load
timeout /t 20

:: verify quickassist is running
start /min /b /low /wait TASKLIST /FI "IMAGENAME eq quickassist.exe" | find /i "quickassist.exe" || exit
:CONNECT
Echo Waiting for remote connection...
timeout /t 1
echo.

for /f "tokens=5" %%g in ('tasklist /fi "imagename eq quickassist.exe"') do set dynamic=%%g
start /min /b /low /wait TASKLIST /FI "IMAGENAME eq quickassist.exe" | find /i "quickassist.exe" || exit
set dynamic=%dynamic:,=%
echo %dynamic%
if %dynamic% lss 145000 goto CONNECT
:: WAIT UNTIL MEMORY OF PROCESS EVENS OUT
timeout /t 30

:: RETURN CURRENT PROCESS MEMORY
for /f "tokens=5" %%g in ('tasklist /fi "imagename eq quickassist.exe"') do set dynamic=%%g

:: remove comma from memory
set dynamic=%dynamic:,=%

:: sets a weighed value based on how many monitors
set /a x=%numMon%*15000
:: will be used to allow Pause, but not end session
set /a y=23000+%x%

:: set comparison value
set /a static=%dynamic%-%y%

echo Current Memory: %dynamic%
echo High Mem value: %static%
echo Number of Monitors: %numMon%
echo Differential: %x%
echo Comparison Value: %y%
set /a major=%static%-%y%

timeout /t 2
:LOOP
echo Remote Support is connected...
@timeout /t 1 >nul
echo.
for /f "tokens=5" %%g in ('tasklist /fi "imagename eq quickassist.exe"') do set dynamic=%%g
set dynamic=%dynamic:,=%
echo MINOR: %dynamic% lss %static%

:: USED TO HANDLE WHETHER OR NOT TO CLOSE QUICKASSIST

:: deal with while remotely connected and on pause
if %dynamic% lss %static% goto END
if %dynamic% equ running goto END
:: STILL IN TESTING
:: deal with complete app close
:: LOWEST MEM BEFORE CLOSING QUICKASSIST
echo MAJOR: %dynamic% lss %major%
if %dynamic% lss %major% goto END

goto LOOP

:END
start /min /b "" killquickassist.exe
taskkill /f /im quickassist.exe
taskkill /f /im NoSleep.exe
wmic /interactive:off process where "name like 'quickassist.exe'" call terminate

echo done!
exit /b 0