Advertisement
iTA360

Autoload AutoHotkey Script when win11 launch

Jul 27th, 2023 (edited)
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Autoload AutoHotkey Script when win11 launch
  2.  
  3. Method 1:
  4.  
  5. Create a shortcut to the .ahk script in the Startup folder. The Startup folder is located at %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup.
  6. Right-click the shortcut and select Properties.
  7. In the Shortcut tab, click the Advanced button.
  8. Check the Run as administrator checkbox.
  9. Click OK to save your changes.
  10. Method 2:
  11.  
  12. Create a batch file that contains the following line:
  13. start "" "C:\path\to\script.ahk"
  14. Save the batch file as autohotkey.bat.
  15. Copy the autohotkey.bat file to the Startup folder.
  16. When Windows 11 starts, the autohotkey.bat file will be executed, which will start the .ahk script.
  17.  
  18. Here is an example of a batch file that you can use to autoload an .ahk script:
  19.  
  20. @echo off
  21.  
  22. start "" "C:\Users\username\Desktop\myscript.ahk"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement