Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Commit f429f26

Browse files
authored
Portable launcher added
1 parent 38c919a commit f429f26

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

ClockOutLauncher.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
import sys
3+
4+
# Get the directory path of the running executable
5+
current_dir = os.path.dirname(os.path.abspath(sys.executable))
6+
7+
# Specify the folder and file names
8+
folder_name = "App"
9+
file_name = "ClockOut.exe"
10+
11+
# Build the path to the file
12+
file_path = os.path.join(current_dir, folder_name, file_name)
13+
14+
# Check if the folder and file exist
15+
if os.path.isdir(os.path.join(current_dir, folder_name)) and os.path.isfile(file_path):
16+
# Change the current working directory to the specified folder
17+
os.chdir(os.path.join(current_dir, folder_name))
18+
19+
# Execute the specified file
20+
os.startfile(file_name)
21+
else:
22+
print("Folder or file not found.")

launcher.ico

18.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)