Hello!
I installed Anki on a flash drive following these instructions and, when I double-click on the .bat file to run Anki, I get the following message.
Have I done something wrong?
Thank you!
Hello!
I installed Anki on a flash drive following these instructions and, when I double-click on the .bat file to run Anki, I get the following message.
Have I done something wrong?
Thank you!
This suggests a problem with your ANKI_BASE variable. Have you adjusted the USB drive letter as suggested? Can you post your Anki.bat?
Could you please explain the 2nd step of the instructions to me?
- When the launcher appears, close it without installing.
Since in the 1st step says:
- Download the latest Anki launcher, and install it in a custom location:
E:\Anki\Launcher. NotE:\Anki\Launcher\Anki.
How can I not install it, when I will already have installed it?
Thanks!
The USB drive letter is L: and the text of my Anki.bat is:
@echo off
echo Starting Anki...
set USB_ROOT=%~dp0
set ANKI_LAUNCHER_VENV_ROOT=L\AnkiProgramFiles
set ANKI_LAUNCHER=L\Launcher\anki
set ANKI_BASE=L\AnkiData
start /b %ANKI_LAUNCHER%
In fact, I do not know if and how I must replace %~dp0 and %ANKI_LAUNCHER%…
I’ve never performed this process. Hopefully someone more familiar with it can help confirm and clarify, but my interpretation is that the instructions are, in more detail:
I don’t know much about Anki portable, but I notice that the colon (“:”) character is missing in your variable.
So, do I have to replace %USB_ROOT% with L:\Anki?
What about the other two variables: %~dp0 and %ANKI_LAUNCHER%?
You posted a link to a Anki Manual page with instructions. As I understand it, if someone follows the instructions exactly, they don’t need to make any changes to the .bat file. They can copy the .bat file verbatim, run it, and have it work just fine.
Are you saying that you followed the instructions using the .bat file verbatim, but got the error message?
(%~dp0 maps to the drive letter and path of the directory the .bat file is run from. So, it shouldn’t matter if you run it from L:/ or E:/ or F:/. The script should automatically detect and use the correct drive letter and directory path. (As I understand it, that is. I don’t use Windows computers.))
Edit: added:
Yes, the Anki Manual instructions should just work, without any changes to the .bat file, if you follow the steps correctly.
Details:
The Anki Manual instructions are written using the example of installing Anki into the E:\Anki directory.
E:\Anki\Launcher and create the .bat file as E:\Anki\Anki.bat..bat file, %~dp0 will automatically get mapped as E:\Anki (the directory the .bat file is located in).USB_ROOT also will get mapped as E:\Anki.ANKI_LAUNCHER_VENV_ROOT will be E:\Anki\AnkiProgramFilesANKI_LAUNCHER will be E:\Anki\Launcher\ankiANKI_BASE will be E:\Anki\AnkiData.bat file)..bat file)..bat file works even if you use a different directory.
.bat file into F:\Files, the .bat file still works (because %~dp0 will get mapped to F:\Files)L:\, it still works (because %~dp0 will get mapped to L:\)At least that is how I understand things should work. Again, I don’t use Windows.
Thank you for your help.
I kept the anki.bat text as it is given in the instructions, but, when I run the anki.bat, I get a message that Windows can not find L:\Anki\\Launcher\anki.
The instructions say not to put the Anki Launcher in E:\Anki\Launcher\Anki.
What can I do?
You copied/moved the Anki launcher directory so that it is L:\Anki\Launcher, and you created the .bat file as L:\Anki\Anki.bat, correct? (If so, then the L:\Anki\Launcher\anki file should exist, as I understand it.)
If not, then where did you put the Anki launcher and/or what are the contents of L:\Anki\Launcher when you look at that directory in File Explorer?
I put the anki-launcher-25.09-windows.exe into the L:\Anki\Launcher. So, the L:\Anki\Launcher has just this file. I run it and immediately close it. So there is no L:\Anki\Launcher\anki file.
In fact the instructions confuse me..
The instruction doesn’t say to put that installer exe file there, it says to install the launcher there.
Installing Anki from scratch requires first installing the launcher, then running the launcher to install Anki. Run that install program you downloaded and choose a custom location for the install.
Sorry about that. I didn’t realize that there was an installer program that installs the launcher. So, the instructions should be:
(The confusion is that the procedure involves 2 installs. The first installs the launcher, and then the launcher is used to install Anki itself.)
The instructions seem to indicate that the launcher gets automatically run after the installer installs it. So, step 2 would be:
Excuse me, but I can not figure out what the 2nd step indicates:
2. When the launcher appears, close it without installing.
After the installation of anki-launcher-25.09-windows.exe, Anki opens. Is this the “launcher” that I have to close? It doesn’t ask for any other installation.
Finally, it seems that I’ve done it! I did what I had done the first time, but now it works!
Thank you all!