I'm working on a windows service that needs to simulate input at the windows logon screen. Basically move mouse and also forward keystrokes. The service will be running with full privileges so that's not an issue. I've looked into SendInput, but it only works for the current session. I know there are various types of tools that allow such functionality e.g. remote assistance tools are one example that allow IT support to view the logon screen and provide input as well, so it's definitely do-able, but how?
How do I send keyboard & mouse input to the Windows logon screen?
1.4k Views Asked by tunafish24 At
2
There are 2 best solutions below
0
Sándor Krisztián
On
Gaming mouses can for example can storing password, programming it as a macro, and push a button, then password is sendkeyed.
If you have two monitor, and windows run, you can write Autohotkey macro, move mouse to the rdp window on second monitor, click, and sendkey. This is a basic persistent ahk code, if you push win+L buttons, it logins on second screen.
#l::
MouseMove, 2000, 810 ;the password field in pixel point on second window
Sleep, 200
Click, 1420, 810
Sleep, 200
Send, bazword
Sleep, 200
Send, {ENTER}
return
Related Questions in WINDOWS
- Get Maximum Log Size
- Debugging Windows Services while starting
- Possible consequences of duplicate ProgId for different classes
- How to chain BCryptEncrypt and BCryptDecrypt calls using AES in GCM mode?
- mingw-64 conflicting declarations when cross-compiling
- I run an EXE program from a Windows Service but I can't see form C#?
- Why is PowerShell "not recognized" when installing Chocolatey?
- How to check if Windows device is phone or tablet/pc?
- How to add directories to Cygwin gcc default search path
- Can't install anything with pip2 on Windows 7 due to UnicodeDecodeError
- Active directory and linux nslcd binding without extending the AD schema
- How To Prevent Over Scrolling in Scroll Viewer Windows Phone 8.1
- Unicode error from pip install
- Where is the 'EnablePinning' property in the ribbon framework's recent items?
- How can I implement the same models and data across ASP.NET and Windows Apps
Related Questions in WINAPI
- Make screenshot of DirectX window that is hidden and doesn't have focus
- Is it valid to mutilayered a critical section?
- Implementing callback function for dialog-based application
- Where is the 'EnablePinning' property in the ribbon framework's recent items?
- Confusion about CTRL_SHUTDOWN_EVENT handling in DLLs and WM_QUERYENDSESSION
- Standard control transparency. Possible?
- Disable all power options from the Start menu
- call Win32 API in flex to set Window Display Affinity
- heap error after changing from new allocation to smartpointer
- Win API - Delete all files except some
- Finding the default application for a particular file name extension (Even when served by a metro app)
- How do I declare OutputDebugStringA without windows.h macros?
- WPF giving maximize,minimize,resize control to child window
- Can a dialog intercept drag'n'drop messages passed to its controls?
- WinApi and work with several domains
Related Questions in INPUT
- Trying to set the value of an input with mechanize
- Extract value of a input hidden DOMXpath php
- If Input is focused trigger X else trigger Y
- When in click a radio button, it scroll to the top. How to prenvent that?
- Numeric Keyboard display using HTML input type
- how to get user to pick inputs Java
- Input cursor windows phone phonegap
- C++ cin can't read in integers with 0 in them
- Phonegap VideoPlayer Plugin Sample Code
- Input Autofocus on type
- Why this JavaScript code does not work?
- How to input a value that has a unit as "per something"?
- Is there a standard way to capture keyboard inputs that works in a c++ application for linux and windows?
- Disable or Enable buttons based on some conditions
- How to get keystrokes with java outside of frames
Related Questions in IO
- Java listFiles in directory in jar
- C++ cin can't read in integers with 0 in them
- C++ reading a file into a struct
- What is meant by Streams w.r.t Java IO
- Blender Python Script Deleting Meshes
- C++ not reading anything from files
- Output EOF using %f
- how to write the output of iostream to buffer, python3
- Direct chart plotting Pandas DataFrame columns to Xlsxwriter in a loop
- Why is it slower to print directly to console/terminal than redirecting?
- withDefaultPrettyPrinter() doesn't make the output be formatted
- How fast can we make a specific tr?
- How to grep a string in a program?
- Why does grep give "Binary file (standard input) matches"?
- Trying to use output of one function to influence the next function to count words in text file
Related Questions in WINDOWS-KERNEL
- How does windows terminate processes?
- How do I send keyboard & mouse input to the Windows logon screen?
- Communicating kernel space from user-land in Windows
- NdisChainBufferAtBack substitution in NDIS 6
- how to properly wait for completion of NtCreateFile/etc?
- Debugging Windows Kernel with two VirtualBox hosts
- Device driver does not install on any devices, use primitive driver if this is intended in Visual studio 2019?
- Is kernel space mapped into user space on Linux x86?
- What is the replacement for undocumeneted Windows Kernel API - KeSetAffinityThread() in Windows 7 and later OS
- how to find the number of COM ports and their resources?
- Concatenate large files using Win NT kernel API
- How to share kernel objects, such as Waitable Timers, between processes?
- The Windows desktop becomes paralysed during heavy network I/O / Windows kernel allocates only 1 out of many CPUs?
- How can I see API calls for specific processes in the Windows kernel driver?
- Suspending a NDIS LWF
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
SysInternals PSExec has the
-xcommand line switch to run programs on the logon screen.There is an open source version called PAExec. I guess you'll find some helpful API calls in there. To me it seems the code should be in InteractiveSession.cpp