GiacomoLaw / Keylogger

A simple keylogger for Windows, Linux and Mac
https://simple-keylogger.github.io/
MIT License
2.09k stars 616 forks source link

Program not logging when run at startup #135

Closed teepean closed 9 months ago

teepean commented 1 year ago

Describe the bug I would like the program to run at all times so tried both HKLM and HKCU registry keys. The program starts and task manager shows it is running but does not start logging and the logfile is not created. However if the program is started manually at the location is it behaving as expected.

To Reproduce Create registry key to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and a new entry for the keylogger.

Expected behavior Program starts and starts logging

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Windows 10/11

RaySupreme commented 1 year ago

I'm having the same issue, I tried using shell:startup and windows task sheduler but ran into the same problem. I also tried with a batch file pointing to the exe but nothing.

mydarkthawts commented 9 months ago

I submitted a pull request that adds a system boot-up check function and call it in the main. It will query the windows boot metrics api every 10 seconds and wait for it to return a value that it is fully booted before executing the rest of the program code.

I've very lightly tested this but it is not code breaking at all and appears to work in my multiple virtual machine environments on boot ups with Windows 10, Windows 11, and Windows Server 2022 Datacenter Edition.

This is the pull request.

GiacomoLaw commented 9 months ago

Fixed in #150