-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.vbs
More file actions
24 lines (20 loc) · 1.23 KB
/
startup.vbs
File metadata and controls
24 lines (20 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
' startup.vbs — Add this to Windows Startup folder for autostart
' This launches run_silent.pyw with NO terminal window using pythonw.exe.
'
' HOW TO USE:
' 1. Press Win+R, type: shell:startup → press Enter
' 2. Copy THIS file (startup.vbs) into that Startup folder
' 3. Edit the SCRIPT_PATH line below to match where you saved the project
' 4. Reboot (or double-click the .vbs file to test it now)
'
' To stop autostart: delete this .vbs file from the Startup folder.
' ── EDIT THIS PATH ────────────────────────────────────────────────────────────
Dim SCRIPT_PATH
SCRIPT_PATH = "E:\SmartCompress\run_silent.pyw"
' ─────────────────────────────────────────────────────────────────────────────
Dim WShell
Set WShell = CreateObject("WScript.Shell")
' Run pythonw (windowless) with the script path, in the script's own directory
WShell.Run "pythonw """ & SCRIPT_PATH & """", 0, False
' The 0 = no window, False = don't wait for it to finish
Set WShell = Nothing