Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a Python program at start-up on Windows

I am developing a key-logger on Python (only for curiosity sake). And the script will be an executable. The process will not need a UI or user interaction.

Is there any way, even in another executable to make the key-logger start at start-up?

like image 701
Richard Paul Astley Avatar asked Oct 14 '25 09:10

Richard Paul Astley


1 Answers

I don't use Windows, but you can try making a batch script that runs your python file and make that script Run a program automatically when Windows starts:

  1. Click the Start button Picture of the Start button , click All Programs, right-click the Startup folder, and then click Open.

  2. Open the location that contains the item you want to create a shortcut to.

  3. Right-click the item, and then click Create Shortcut. The new shortcut appears in the same location as the original item.

  4. Drag the shortcut into the Startup folder.

As I said, I don't use Windows, so it might be totally wrong.

You can refer here for making the BAT file, which basically says:

@echo off
python c:\somescript.py %*
pause
like image 141
Sait Avatar answered Oct 16 '25 21:10

Sait



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!