Sure, here are the steps to run a batch file at startup in Windows:
- Create a Batch file: Write your commands in a text file and save it with a
.bat
extension¹.- Create a Shortcut: Right-click on the batch file and select
Create shortcut
⁴.- Open Startup Folder: Press the
Win + R
keyboard shortcut to launch theRun
dialog. Typeshell:startup
and pressEnter
to open theStartup
folder for the current user⁶. If you want the batch file to run for all users, typeshell:common startup
instead⁶.- Paste the Shortcut: Once the
Startup
folder has been opened, paste the shortcut into the folder⁸.Now, every time you start your computer, the batch file will run automatically. Please note that you might need administrative privileges to perform these steps⁵.
Source: Conversation with Copilot, 6/11/2024
(1) How to Create a Batch (.bat) File in Windows. https://www.youtube.com/watch?v=sODXtX7jdcI.
(2) How to make a .bat file autorun on pc startup - Stack Overflow. cmd - How to make a .bat file autorun on pc startup - Stack Overflow.
(3) Run Batch File (.BAT) on Startup in Windows - ShellHacks. how to run a batch file at startup in Windows - Search.
(4) How to create batch script files on Windows 11. How to create batch script files on Windows 11 | Windows Central.
(5) how do i autostart batch file on windows startup - Stack Overflow. cmd - how do i autostart batch file on windows startup - Stack Overflow.
(6) How to Run Batch File as Administrator Without Prompt in Windows 10. https://www.youtube.com/watch?v=BH8N2eVHvUY.
(7) How to Create a Batch (.bat) File in Windows 11 [Solution]. https://www.youtube.com/watch?v=8fnVlKyjmGI.
(8) How To Run Batch File On Windows Startup - StackHowTo. https://stackhowto.com/how-to-run-batch-file-on-windows-startup/.
(9) undefined. How to Run a Batch File Each Time the Computer Loads Windows.
For the first step, create your own Batch file that you can call run_frndly_tv_on_startup.bat
with the following content:
REM Full path where the code from Github was downloaded
cd C:\Users\<user>\<...>\frndlytv-for-channels
REM Replace %FRNDLY_EMAIL% and %FRNDLY_PASSWORD% with their real values
python app.py --PORT 8183 --USERNAME "%FRNDLY_EMAIL%" --PASSWORD "%FRNDLY_PASSWORD%"