Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP add windows-installer script, and bring back absen startup reminder #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added absen-startup.exe
Binary file not shown.
40 changes: 40 additions & 0 deletions windows-install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"""
simple script to "install" the ravioli, it just put the absen startup in the startup folder
"""

if __name__ == "__main__":
import os
import sys
import subprocess

#targeted file
target_file = "absen-startup.exe"

#print target_file if exist
if os.path.isfile(target_file):
print("[+] file found")

#startup folder
startup_folder = os.path.join(os.environ["APPDATA"], "Microsoft", "Windows", "Start Menu", "Programs", "Startup")
print("your startup folder : ", startup_folder)

#get the current path of targeted file
target_file = os.path.abspath(target_file)

#create shortcut from targeted file
try:
subprocess.call(["cmd", "/c", "mklink", "/J", os.path.join(startup_folder, "absen-startup.lnk"), target_file])
print("[+] shortcut created")
except Exception as e:
print(e)
sys.exit(1)

print("[+] done")

print("ravioli installed")
input("press enter to exit")