Auto Launch
Auto launch any application or executable at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
How does it work? See Teamwork/node-auto-launch for details.
If you find any bugs, welcome to PR or issue.
Usage
The parameters of AutoLaunch::new are different on each platform.
See the function definition or the demo below for details.
AutoLaunchBuilder helps to eliminate the constructor difference on various platforms.
use *;
Linux
use AutoLaunch;
macOS
macOS supports two ways to achieve auto launch (via AppleScript or Launch Agent).
When the use_launch_agent is true, it will achieve by Launch Agent, otherwise by AppleScript.
Note:
- The
app_pathshould be a absolute path and exists. Otherwise, it will cause an error whenenable. - In case using AppleScript, the
app_nameshould be same as the basename ofapp_path, or it will be corrected automatically. - In case using AppleScript, only
--hiddenand--minimizedinargsare valid, which means that hide the app on launch.
use AutoLaunch;
Windows
On Windows, it will add a registry entry under \HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
use AutoLaunch;
License
MIT License. See the License file for details.
Acknowledgement
The project is based on node-auto-launch.