Open AnweshGangula opened 2 years ago
Sorry, no idea -- I don't use Windows really. It must be possible, since Windows has services (or even simpler 'autostart' shortcuts)
I was able to setup a Task Scheduler in Windows and trigger it to automatically run on Windows Startup using the below script:
cmd /c ""C:\Program Files\Git\bin\bash.exe" --login -i -- %USERPROFILE%\Downloads\promnesiaServe.sh"
Note that I was only able to get it work using
Git Bash
. running command directly incmd
orpowershell
did not work
Below are the steps:
Create a bash file with the below script
#!/bin/bash
cd /D/Source_Code/GitHub/promnesia # this is the path to my local clone of the promnesia repo
# echo Change Directory done
./scripts/promnesia serve
%USERPROFILE%\Downloads\promnesiaServe.sh
Run Promnesia Serve
When computer starts
and click NextStart a Program
and click Nextcmd
or C:\Windows\System32\cmd.exe
b. Add arguments (optional): input /c ""C:\Program Files\Git\bin\bash.exe" --login -i -- %USERPROFILE%\Downloads\promnesiaServe.sh"
Note that sometimes the Task Scheduler doesn't start the task on Windows Start, so its better to add a 5 mins delay in the Trigger, which will ensure the task to be run.
Reference:
The documentation mentions that we can use
promnesia install-server
in Linux and OSX to autostart promnesia server, but it doesn't talk about Windows.Is there a way to do this in Windows?