Creating .bat file for joplin start

Operating system

Windows

Joplin version

3.4.12

Desktop version info

3.4.12

What issue do you have?

i want to include joplin in a bat file to open a few apps after win11 startup. I am using the command
start "" "C:\Users\user\AppData\Local\Programs\Joplin\Joplin.exe".

The other apps startup, but joplin doesn't start. there is an error message: “Sentry: Initialized with autoUploadCrashDumps: true
(node:7728) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use Joplin --trace-deprecation ... to show where the warning was created)” in the command box., which often stays open after running.

I use this .bat on 2 different computers and it tends to work fine on one, but generally fails on the other.
Any suggestions why the path above is not working? It is the same path contained in the joplin shortcut on taskbar, which works ok.
Yes, I have changed the username to suit the computer that the .bat is being used on. and I have followed the path to check that joplin.exe is located there.

It may be useful to check joplin log.txt located in profile directory, whether it contains any relevant messages.

If starting joplin from bat file is not hard requirement for you, there are other ways how to start app on logon, for example via Task Scheduler or by creating an entry in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

1 Like

Guess I don’t know where the profile directory is, because in the only joplin directory that I see, I am not seeing log.txt.

I’d like to stick with figuring out a solution to my original question, rather than head in a different direction.

Try Help/Open Profile Directory

Honestly, the command looks fine for me. What happens if you just try to execute "C:\Users\user\AppData\Local\Programs\Joplin\Joplin.exe" from a command line window directly?

I’m not OP, but I get the same output from the command line on Win10. The start command also doesn’t finish on its own, forcing a Ctrl-C, but maybe that’s how the command meant to work. :woman_shrugging:

Note: The first attempt was while Joplin was already running.

I did look at log.txt and didn’t see text that indicated error to me. of course, lots was there that I didn’t understand. However, for some reason, not seeing any error in log.tx, and seeing text indicating that joplin was running and operating, t I checked in the hidden notification window, and there was joplin. Tried right click, close, but it didn’t go away. perhaps there were several instances running, from running the .bat several times. left clicking on it opened it on screen and also expanded the joplin button in taskbar to show it as an open app. Just as it would look if I had started it from the taskbar.

I checked joplin options and found ‘start application minimized in the tray icon’ checked. I don’t remember checking this, and don’t know why I would have, but I unchecked it and tested the .bat file again, a few times. It now worked as hoped, with joplin opening on screen, and joplin taskbar button expanded to show that it is running.

this doesn’t explain the command window error messages. but as long as it is working, i am satisfied. I’ll see what happens tomorrow.

Not every log message is error message. Especially when the message explicitly mentions, that it’s a DeprecationWarning.

This particular message is just a notification for author of the application, that he should update something in app code. Nothing you as app user should be worried about.

1 Like

Have you tried, by hand, without the batch file, using two commands instead of one? First cd to the proper directory, then simply execute the app. See if that works directly from a terminal mode. If it works, then use both commands in the batch file to launch it.

as I mentioned in previous post. so far it is working in .bat file. was having issue with bat window remaining open, due to error msg about deprecation in joplin (?), but have rearrange the commands to put joplin last, with ‘exit 0’ at end. after 2 tries it is working ok..

tomorrow may be different.

hi - I ran into this problem as well - don’t know why but the only way I could get it to work (without displaying error msg and leaving windows open) was to call a separate .bat file from the main .bat file
eg:
from my main script that does a bunch of stuff
start "Joplin" "H:\Scripts\Task_Joplin_Run.cmd"
main script keeps going with other stuff
the Task_Joplin_Run.cmd contains the same command as listed in above posts, but it works... again, don't know why but...

@echo off
start "Joplin" "C:\Program Files\Joplin\Joplin.exe"

:EXIT
exit

note: the "Joplin" in quotes after start can be anything, or just blank "" but windows cmd requires something there

oh - and should mention I always have Joplin set to "start application minimized in the tray icon" (ie checked/enabled) like you had initially - my workaround works with this setting enabled

I get different results at different times. Command prompt window remaining open doesn’t happen on laptop. at least not so far. haven’t tried it enough on desktop since making change to .bat to know.

However, I have noticed some unexpected about notification area. Joplin is running there whether option to run in notification is checked or not. Not checked on my systems. Yet, when I open Joplin on screen, there it is. Even after I close Joplin on screen, it continues in notification area, and will open from there. Have to close separately to remove from notification are. I am simply mentioning this, not saying it is a problem. It doesn’t seem to effect Joplin operation in any way that I can tell, so I don’t care about it.