Automatic initialization

0

I have a program in Python and need it to start automatically with Windows, I could not find any material related to this on the internet.

    
asked by anonymous 04.06.2015 / 17:22

2 answers

1
  • Type Win + R to open the "Run ..." menu;
  • Type "shell: Startup" to open the "Initialize" folder.
  • Any program whose shortcut you drag to this folder will run when Windows boots.

    (If you need parameters from the command line for the program, you will need to create a .bat file that does this.)

        
    04.06.2015 / 18:28
    0

    Click Start Menu > All Programs > Initialize

    In English: Start Menu > All Programs > Startup

    Inside the boot folder, place the shortcut of your .bat file that will open your python program when you start Windows.

    To create the .bat file you can open Notepad and type this:

    start Python caminho
    

    Instead of path you place where your python file is .py . If the file is in the same folder as the .bat file, just put the file name. Example:

    teste.py
    

    Otherwise, you put the entire path, for example:

    start Python C:/Users/User/Desktop/teste.py
    

    At the time of saving as, do not forget to save as .bat file: start.bat for example. Here is explaining a little about .bat if needed.

    If it does not work, make sure the Python is in the system path .

        
    07.06.2015 / 15:34