Aha! Thank you, that is the crucial piece of information. This is a very common setup for developers using Conda or its variants like Miniforge.
Your AutoRun key isn't calling doskey directly. It's calling Conda's environment setup script (conda_hook.bat). The "DOSKEY not found" error is happening because that conda_hook.bat script (or another script it calls) is the one trying to run doskey.
The root cause is exactly the same as we diagnosed: The hook script runs fine in your normal terminal, but fails in GUI Guider's limited-PATH environment because it can't find doskey.exe.
You must not delete or simply replace this registry entry, as that will break the functionality of your Conda/Miniforge terminal environments.
The Solution: A Wrapper Batch Script
The safest and most flexible solution is to create your own simple "wrapper" batch script. This script will first fix the environment by adding the system path, and then it will call the Conda hook script. We will point the AutoRun registry key to our new wrapper script.
This solves the problem without modifying any of Conda's files.
Step 1: Create the Wrapper Script
Open Notepad or your favorite text editor (like VS Code).
Copy and paste the following code into the new file.
@echo off
REM =================================================================
REM Custom AutoRun Wrapper Script
REM =================================================================
REM This script fixes the PATH for restricted environments and then
REM calls the original Conda hook script.
REM --- Step 1: Fix the PATH ---
REM Temporarily add the essential Windows directories to the PATH for this session.
REM This ensures system commands like 'doskey.exe' can be found.
@set "PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%PATH%"
REM --- Step 2: Execute the original Conda hook script ---
REM This is the exact command that was originally in your registry.
if exist "C:\ProgramData\miniforge3\condabin\conda_hook.bat" call "C:\ProgramData\miniforge3\condabin\conda_hook.bat"
REM --- Step 3 (Optional): Add your own commands ---
REM If you wanted to define your own doskey aliases, you could add them here.
REM They will now work correctly because the path was fixed in Step 1.
REM For example:
REM %SystemRoot%\system32\doskey.exe ls=dir /B
Step 2: Save the Script
Save this file in a stable, permanent location where it won't be accidentally deleted. Your user directory is a perfect place.
Save it as: C:\Users\YourUsername\autorun_wrapper.bat (Replace YourUsername with your actual Windows username).
Step 3: Update the Registry AutoRun Value
Now we will tell Windows to run our new wrapper script instead of the Conda hook directly.
Open the Registry Editor (regedit).
Navigate back to the key: HKEY_CURRENT_USER\Software\Microsoft\Command Processor
Double-click the AutoRun value on the right-hand side.
Delete the old value and replace it with the full path to your new wrapper script. It is important to enclose the path in quotes in case your username contains spaces.
Set the new value to: "C:\Users\YourUsername\autorun_wrapper.bat"
Click OK and close the Registry Editor.
Summary of Why This Works
Now, every time any program (your terminal, GUI Guider, etc.) starts a new command prompt, the following happens:
Windows AutoRun executes your autorun_wrapper.bat script.
Your script immediately adds the essential Windows system directories to the PATH for that specific command session.
Your script then calls the original conda_hook.bat.
When the Conda script now tries to run doskey (or any other system command), it succeeds because the location of doskey.exe (C:\Windows\System32) is now in the PATH.
The error in GUI Guider will be gone, and your Miniforge/Conda terminals will continue to work exactly as they did before.