


(As above, you will need to use your Python distribution's path.) Test your script In the Properties dialog's Shortcut tab, edit the "Target" to look something like "C:\Program Files\Python310\pythonw.exe" pentest_keylogger.py and the "Start in" to be the folder in which pentest_keylogger.py is found. In the Startup folder, right click on the app you just created and select "Properties." For the OP, I recommend "Self penetration test."Ĭlick "Finish." Edit the shortcut to launch your script On the next "Create Shortcut" screen, titled, "What would you like to name the shortcut," you can name it whatever you want. It opens in Roaming by default, but be sure to look in Local, too.)Īs mentioned at the start of this answer, it is important that you select pythonw.exe rather than python.exe as pythonw.exe will run without opening a command prompt. (You can paste %appdata% into the run dialog to open this folder and look for Python. More recently, Python is found somewhere within %appdata%. Your Python install is likely in a different location.

Right-click in this folder and say "New shortcut." Browse to "This PC," "Windows (C:)," "Program Files,", "Python39", and select pythonw.exe. (For me, the startup folder is at C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.) Create new shortcut Shorcuts in this folder are launched when the computer starts. In the Run dialog, type shell:startup and it enter. Type the Windows and R keys at the same time. Detailed instructions Open the startup folder The w version of Python is needed so that it starts up without a shell in the background. Create a shortcut in the shell:startup folder with an absolute path to your pythonw.exe executable.
