(zettel (meta (backward "00001003300000") (box-number "1") (created "00010101000000") (forward "00001003300000 00001003305102 00001003305104 00001003305106 00001003305108 00001003305110 00001003305112 00001003305114 00001003305116 00001003305118 00001003305120 00001003305122 00001003305124") (modified "20220218125541") (published "20220218125541") (role "manual") (syntax "zmk") (tags "#installation #manual #zettelstore") (title "Enable Zettelstore to start automatically on Windows")) (rights 4) (encoding "") (content "Windows is a complicated beast. There are several ways to automatically start Zettelstore.\n\n=== Startup folder\n\nOne way is to use the [[autostart folder|https://support.microsoft.com/en-us/windows/add-an-app-to-run-automatically-at-startup-in-windows-10-150da165-dcd9-7230-517b-cf3c295d89dd]].\nOpen the folder where you have placed in the Explorer.\nCreate a shortcut file for the Zettelstore executable.\nThere are some ways to do this:\n* Execute a right-click on the executable, and choose the menu entry \"\"Create shortcut\"\",\n* Execute a right-click on the executable, and then click Send To > Desktop (Create shortcut).\n* Drag the executable to your Desktop with pressing the ''Alt''-Key.\n\nIf you have created the shortcut file, you must move it into the Startup folder.\nPress the Windows logo key and the key ''R'', type ''shell:startup''.\nSelect the OK button.\nThis will open the Startup folder.\nMove the shortcut file into this folder.\n\nThe next time you log into your computer, Zettelstore will be started automatically.\nHowever, it remains visible, at least in the task bar.\n\nYou can modify the behavior by changing some properties of the shortcut file.\n\n=== Task scheduler\n\nThe Windows Task scheduler allows you to start Zettelstore as an background task.\n\nThis is both an advantage and a disadvantage.\n\nOn the plus side, Zettelstore runs in the background, and it does not disturbs you.\nAll you have to do is to open your web browser, enter the appropriate URL, and there you go.\n\nOn the negative side, you will not be notified when you enter the wrong data in the Task scheduler and Zettelstore fails to start.\nThis can be mitigated by first using the command line prompt to start Zettelstore with the appropriate options.\nOnce everything works, you can register Zettelstore to be automatically started by the task scheduler.\nThere you should make sure that you have followed the first steps as described on the [[parent page|00001003300000]].\n\nTo start the Task scheduler management console, press the Windows logo key and the key ''R'', type ''taskschd.msc''.\nSelect the OK button.\n\n{{00001003305102}}\n\nThis will start the \"\"Task Scheduler\"\".\n\nNow, create a new task with \"\"Create Task ...\"\"\n\n{{00001003305104}}\n\nEnter a name for the task, e.g. \"\"Zettelstore\"\" and select the options \"\"Run whether user is logged in or not\"\" and \"\"Do not store password.\"\"\n\n{{00001003305106}}\n\nCreate a new trigger.\n\n{{00001003305108}}\n\nSelect the option \"\"At startup\"\".\n\n{{00001003305110}}\n\nCreate a new action.\n\n{{00001003305112}}\n\nThe next steps are the trickiest.\n\nIf you did not created a startup configuration file, then create an action that starts a program.\nEnter the file path where you placed the Zettelstore executable.\nThe \"\"Browse ...\"\" button helps you with that.[^I store my Zettelstore executable in the sub-directory ''bin'' of my home directory.]\n\nIt is essential that you also enter a directory, which serves as the environment for your zettelstore.\nThe (sub-) directory ''zettel'', which will contain your zettel, will be placed in this directory.\nIf you leave the field \"\"Start in (optional)\"\" empty, the directory will be an internal Windows system directory (most likely: ''C:\\\\Windows\\\\System32'').\n\nIf you press the OK button, the \"\"Create Task\"\" tab shows up as on the right image.\n\n{{00001003305114}}\\ {{00001003305116}}\n\nIf you have created a startup configuration file, you must enter something into the field \"\"Add arguments (optional)\"\".\nUnfortunately, the text box is too narrow to fully see its content.\n\nI have entered the string ''run -c \"C:\\\\Users\\\\Detlef Stern\\\\bin\\\\zsconfig.txt\"'', because my startup configuration file has the name ''zsconfig.txt'' and I placed it into the same folder that also contains the Zettelstore executable.\nMaybe you have to adapt to this.\n\nYou must also enter appropriate data for the other form fields.\nIf you press the OK button, the \"\"Create Task\"\" tab shows up as on the right image.\n\n{{00001003305118}}\\ {{00001003305120}}\n\nYou should disable any additional conditions, since you typically want to use Zettelstore unconditionally.\nEspecially, make sure that \"\"Start the task only if the computer is on AC power\"\" is disabled.\nOtherwise Zettelstore will not start if you run on battery power.\n\n{{00001003305122}}\n\nOn the \"\"Settings\"\" tab, you should disable the option \"\"Stop the task if it runs longer than:\"\".\n\n{{00001003305124}}\n\nAfter entering the data, press the OK button.\nUnder some circumstances, Windows asks for permission and you have to enter your password.\n\nAs the last step, you could run the freshly created task manually.\n\nOpen your browser, enter the appropriate URL and use your Zettelstore.\nIn case of errors, the task will most likely stop immediately.\nMake sure that all data you have entered is valid.\nTo not forget to check the content of the startup configuration file.\nUse the command prompt to debug your configuration.\n\nSometimes, for example when your computer was in stand-by and it wakes up, these tasks are not started.\nIn this case execute the task scheduler and run the task manually."))