how do we make an app.py that runs automatically with (.bat)

Helga Rizka Putra Prayoga 20 Reputation points
2026-10-12T09:40:42.9433333+00:00

i once had problems setting up python, at the time i wanted make invitation website, but i want to make this website automatic by sharing the invitation file using (.bat), is that possible?

SQL Server on Azure Virtual Machines
0 comments No comments

Answer accepted by question author
Marcin Policht 110.3K Reputation points MVP Volunteer Moderator
2026-10-12T11:00:16.5266667+00:00

Yep - you can automate an invitation website and distribute it using a .bat file, without requiring every recipient to install Python. The best approach depends on whether you want the invitation to open as a website in the recipient's browser or to be hosted online.

If you want to share the invitation directly as a file, you can create a self-contained HTML invitation containing the design, text, photos, RSVP form, and interactive elements. Recipients would receive an .html file and open it in their browser. You can also provide a .bat file that automatically opens the invitation in the default browser. For example, the .bat file could contain the following code:

@echo off start "" "%~dp0invitation.html" exit

Save this as OpenInvitation.bat in the same folder as invitation.html. When the recipient double-clicks the .bat file, Windows opens the invitation in their default browser. The %~dp0 variable ensures that the HTML file is located relative to the batch file, so the folder can be moved or copied elsewhere.

Note that a .bat file does not turn a website into an online website by itself. If your invitation needs online RSVP submissions, shared guest lists, live updates, or automatic email notifications, you will need a hosted service or a backend. A standalone HTML file can handle local interactions, but it cannot reliably collect responses from multiple guests into a shared database without an online service.

Given your previous problems setting up Python, I would start with a self-contained HTML invitation plus a .bat launcher. This avoids Python installation and server configuration entirely for a basic invitation. If you want, the invitation can also be designed to look like a modern mobile-friendly website, with animations, photographs, an event countdown, and RSVP buttons.


If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

hth

Marcin

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.