-1

I have a .python script which I convert to .exe file trough autopy-to-exe command and I would like that coverted .exe file always running, so when computer restarts it automaticly starts.

So I want to create in .python script that. I want to configure it so when somebody downloads .exe file and runs it, that .exe file will be in his startup so next time when he logs in that .exe will be working as well.

RedLine
  • 11
  • 1
  • Does this answer your question? [How to put exe file in windows Startup](https://stackoverflow.com/questions/3012151/how-to-put-exe-file-in-windows-startup) – catasaurus Apr 13 '22 at 02:08
  • There are various methods to achieve this. But this sounds like a typical malware. – Kaveen Perera Apr 13 '22 at 02:53

1 Answers1

3

The simplest way to accomplish this is by placing it in your Startup directory. Windows will launch anything in there when someone signs in. You may also set this to run when any user logs in by using the "All Users" Startup folder.

This is the filepath for the Startup folder, for your user account:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
and you can copy and paste that path right into Windows Explorer's address bar to get there. Drop in the .exe and it will launch on the next login.

Reference for Startup folder

zodiac508
  • 186
  • 8
  • Well how do I make that in script? So its automatic for all people who will use it – RedLine Apr 13 '22 at 02:29
  • There is nothing you need to do in your script. As long as you create an .exe from it, you just need to paste that executable in the appropriate Startup folder (yours or All Users). The full path for all users is: `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup` – zodiac508 Apr 13 '22 at 02:58
  • After re-reading the question, you want this to happen when it is downloaded and run. You can figure that one out. Not going to answer something potentially malicious. – zodiac508 Apr 13 '22 at 03:57