Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: --- (bat) wifi auto on-connect script (for windows wifi) #2/2 ---
- :: -- (python) Script #1/2 here: https://pastebin.com/wcJaa963 --
- :: -- create a shortcut of this file. Once created, right click on it
- :: -- Now "Create Shortcut". Cut/copy the shortcut, paste in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
- :: -- You can use this if you only want it on current user: --
- :: -- C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup --
- :: -- Finished. Restart computer/logout current user. This script will run on ALL USERS on PC. --
- @echo off
- :: --- Check for admin ---
- net session >nul 2>&1
- if %errorlevel% neq 0 (
- echo Requesting administrative privileges...
- powershell -Command "Start-Process '%~f0' -Verb RunAs"
- exit /b
- )
- :: --- Activate Conda environment ---
- CALL C:\ProgramData\Anaconda3\Scripts\activate.bat yolo_env2
- :: --- Navigate to script directory ---
- cd /d C:\Users\{PUT YOUR USERNAME OF YOUR USER}\Desktop\{WHATEVER LOCATION YOU WANT}
- :: --- Run Python script visibly ---
- python {PUT YOUR PYTHON SCRIPT#1/2 NAME HERE}.py
- :: --- Keep window open after script exits ---
- pause
Advertisement
Add Comment
Please, Sign In to add comment