Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os
- from time import sleep
- from PyQt5.QtGui import QGuiApplication
- from PyQt5.QtQml import QQmlApplicationEngine
- user = os.environ['USERNAME']
- app = QGuiApplication(sys.argv)
- engine = QQmlApplicationEngine()
- engine.quit.connect(app.quit)
- engine.load("C:/Users/" + user + "/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/start.qml")
- sleep(1)
- print("attempting removal")
- os.remove("C:/Users/" + user + "/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/start.py")
- print("removed start.py")
- os.remove("C:/Users/" + user + "/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/start.qml")
- print("removed start.qml")
- os.remove("C:/Users/" + user + "/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/main.qml")
- sys.exit(app.exec())
Add Comment
Please, Sign In to add comment