Python Question re Executing a Script

Mike Dewhirst miked at dewhirst.com.au
Sat Apr 30 22:15:01 EDT 2022


On 1/05/2022 8:37 am, Brent Hunter wrote:
> Hello,
>
> I just purchased a new Windows 11 computer and installed Python 3.10.4 (64 bit).  I can't figure out from your documentation, how do I:
>
>
>    1.  Run a python script that is located in the same directory ( C:\Users\Brent\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.10 )
>
>
>    1.  How do I automatically run a python app at Windows startup?

https://www.windowscentral.com/how-launch-apps-automatically-during-login-windows-11

Personally, I write a batch file containing the 'python 
/location/of/script.py' command line and call that batch file. That 
assumes python.exe is on the Windows path.

Once tested and working it lets me edit the batch file to adjust the 
payload without having to touch the Windows stuff again.




>
> Thank you!
>
> Brent Hunter
>


-- 
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://mail.python.org/pipermail/python-list/attachments/20220501/417d5886/attachment.sig>


More information about the Python-list mailing list