Opening .exe with a batch file
August 3, 2022 12:32 AM   Subscribe

I'm trying to set up a batch file that will open all the apps I use for work at once. Most of the apps are opening without a problem (chat program, my browser, spotify, etc) however I'm having a problem with Todoist. Code and error below the fold.

The code I'm using is this:

start "" "C:\Users\****\AppData\Local\Programs\todoist\Todoist.exe"

exit


And this is what it says. Todoist launches, but the command window doesn't close. If I close the command window Todoist closes as well. Is there some sort of modification to the opening command I need to make?

09:24:31.742 > Checking for update
09:24:32.584 > Update for version 1.0.8 is not available (latest version: 1.0.8, downgrade is disallowed).
09:24:32.587 > checkForUpdatesAndNotify called, downloadPromise is null
posted by Braeburn to Computers & Internet (6 answers total)
 
You don't need start. Just

C:\Users\YOURUSERNAME\AppData\Local\Programs\todoist\Todoist.exe

will open todoist. Just tested it myself.

Start opens up a SEPARATE command window (so you have two), which is probably the window you're looking at. The original one that ran the batch file closed upon hitting *exit*. You're looking at the "child" window it opened, and thought it was the original window you opened.
posted by kschang at 1:26 AM on August 3, 2022


Response by poster: I removed the start command, but I'm still having the problem that Todoist launches, but the command window doesn't close, and it prints the additional lines reguarding updates.

If I close the command window Todoist closes as well.
posted by Braeburn at 4:30 AM on August 3, 2022


You might try appending /b ("Starts an application without opening a new Command Prompt window") to your START command, per this page.
posted by davcoo at 4:44 AM on August 3, 2022 [1 favorite]


I don't use Todoist but try starting it with /? to see if it issues "help" about the options. There may be a 'start silently' option. You can also look at the properties of Todoist's icon to see if the startup command is there and then copy that command
posted by TimHare at 11:23 AM on August 3, 2022


We're looking at a different problem. Your problem is not with start or the dos shell.

I think I spotted the problem. Your window is NOT closing because your starting of Todoist is also triggering its autoUpdate feature in the background. So that should be intended behavior. The window will not close while the updater is running.

If it will not close itself after an extended amount of time, would be a problem to ask Todoist tech support.
posted by kschang at 2:27 AM on August 4, 2022


Response by poster: Thank-you everyone! Eventually I was able to make it work the way I wanted with this command:

cmd /c start "" "C:\Users\****\AppData\Local\Programs\todoist\Todoist.exe"
posted by Braeburn at 3:53 AM on August 4, 2022


« Older Indoor insect bites problem   |   I live in Toronto. I want to see the Northern... Newer »
This thread is closed to new comments.