You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The instructions from rakubrew init tells me to run rakubrew init for powershell instructions. Yet I'm already running that command from powershell.
(Note that the above does not enable auto-loading in PowerShell, that needs a
separate installation procedure. Call C:\rakubrew\bin\rakubrew.exe init in a PowerShell window
for respective installation instructions.)
PS C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools> C:\rakubrew\bin\rakubrew.exe init
To load rakubrew in CMD automatically you have to do two things:
1. Check that you don't already have a CMD autorun script set.
reg query "HKCU\Software\Microsoft\Command Processor" /v AutoRun
If you don't have an autorun script set (the above command returns an error) you can set one using:
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d \""%"USERPROFILE"%\Documents\CMD_profile.cmd"\" /f
2. Add the following code to the end of the autorun script you linked in step 1:
@echo off
setlocal EnableDelayedExpansion
set "cmd=!cmdcmdline!"
if "!cmd!" == "!cmd:/=!" (
endlocal
FOR /f "delims=" %%i in ('"C:\rakubrew\bin\rakubrew.exe" init Cmd') do @%%i
)
You can easily do that from a CMD prompt using the following command:
(
echo @echo off
echo setlocal EnableDelayedExpansion
echo set "cmd=!cmdcmdline!"
echo if "!cmd!" == "!cmd:/=!" ^(
echo endlocal
echo FOR /f "delims=" %%i in ^('"C:\rakubrew\bin\rakubrew.exe" init Cmd'^) do @%%i
echo ^)
) >> "%USERPROFILE%\Documents\CMD_profile.cmd"
If you use a different autorun script location, replace the path in the command above.
(Note that the above does *not* enable auto-loading in PowerShell, that needs a
separate installation procedure. Call `C:\rakubrew\bin\rakubrew.exe init` in a PowerShell window
for respective installation instructions.)
The text was updated successfully, but these errors were encountered:
The logic to detect whether it's PS or CMD is here. It relies on some env var trickery. (See those 6 lines of code and the linked StackOverflow explanation.) Can you check how the environment looks on your machine? Maybe you can identify some other clue that gives away whether we're in a PS or CMD?
The instructions from rakubrew init tells me to run rakubrew init for powershell instructions. Yet I'm already running that command from powershell.
The text was updated successfully, but these errors were encountered: