Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Autoload AutoHotkey Script when win11 launch
- Method 1:
- Create a shortcut to the .ahk script in the Startup folder. The Startup folder is located at %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup.
- Right-click the shortcut and select Properties.
- In the Shortcut tab, click the Advanced button.
- Check the Run as administrator checkbox.
- Click OK to save your changes.
- Method 2:
- Create a batch file that contains the following line:
- start "" "C:\path\to\script.ahk"
- Save the batch file as autohotkey.bat.
- Copy the autohotkey.bat file to the Startup folder.
- When Windows 11 starts, the autohotkey.bat file will be executed, which will start the .ahk script.
- Here is an example of a batch file that you can use to autoload an .ahk script:
- @echo off
- start "" "C:\Users\username\Desktop\myscript.ahk"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement