简体   繁体   中英

Running Multiple Scripts from Startup Folder on Windows 7

Wondering if anyone can shed light on this issue I am having.

I have two python scripts which I want to run when anyone logs into the computer. I have added the scripts to the Startup folder for all users. When I log in the scripts should run with pythonw.exe, both scripts have the pyw extension.

When I log in to my own account, it will only start one script. When I log in to a guest account both scripts start fine.

I have checked AV and the script is not being blocked. Both files access a txt file on the C: drive. I have ensured all users have permissions to access the files.

I can run the second script manually and it works as expected but cannot figure out why it will not run at startup on the admin account.

Well thanks for the tip about adding the shebang line. I now know what the issue was. I had python2.7 installed also and the scripts were trying to start with this instead of 3.6. The guest account had the files associatted correctly, that why it worked. All good now. Thanks guys.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM