Merge pull request #2942 from daxgames/cmder4win

Cmder for Windows  - Add `Bash`, `Powershell`, `mintty`.
This commit is contained in:
Dax T Games 2025-03-09 08:56:35 -07:00 committed by GitHub
commit 7ac805cda5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 205 additions and 88 deletions

View File

@ -52,6 +52,27 @@ jobs:
working-directory: scripts
run: .\pack.ps1 -verbose -terminal all
- name: Upload artifact (cmder_win_mini.zip)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win_mini.zip
name: cmder_win_mini.zip
if-no-files-found: error
- name: Upload artifact (cmder_win.7z)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win.7z
name: cmder_win.7z
if-no-files-found: error
- name: Upload artifact (cmder_win.zip)
uses: actions/upload-artifact@v3
with:
path: build/cmder_win.zip
name: cmder_win.zip
if-no-files-found: error
- name: Upload artifact (cmder_wt.zip)
uses: actions/upload-artifact@v3
with:

View File

@ -6,6 +6,12 @@
- Fixes #2940
### Adds
- Cmder for Windows
- Uses Windows and Git for Windows Native Terminals.
- Does not contain a terminal emulator like ConEmu or Windows Terminal.
## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18)
### Changes

View File

@ -188,6 +188,9 @@
<ItemGroup>
<ClCompile Include="src\CmderLauncher.cpp" />
</ItemGroup>
<ItemGroup>
<Image Include="..\icons\cmder.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -107,9 +107,9 @@ bool FileExists(const wchar_t * filePath)
void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring title = L"", std::wstring iconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"")
{
#if USE_TASKBAR_API
wchar_t appId[MAX_PATH] = { 0 };
#endif
#if USE_TASKBAR_API
wchar_t appId[MAX_PATH] = { 0 };
#endif
wchar_t exeDir[MAX_PATH] = { 0 };
wchar_t icoPath[MAX_PATH] = { 0 };
wchar_t cfgPath[MAX_PATH] = { 0 };
@ -131,8 +131,17 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
wchar_t windowsTerminalDir[MAX_PATH] = { 0 };
wchar_t conEmuDir[MAX_PATH] = { 0 };
wchar_t winDir[MAX_PATH] = { 0 };
wchar_t emulatorPath[MAX_PATH] = { 0 };
wchar_t vendorDir[MAX_PATH] = { 0 };
wchar_t initCmd[MAX_PATH] = { 0 };
wchar_t initPowerShell[MAX_PATH] = { 0 };
wchar_t initBash[MAX_PATH] = { 0 };
wchar_t initMintty[MAX_PATH] = { 0 };
wchar_t vendoredGit[MAX_PATH] = { 0 };
wchar_t amdx64Git[MAX_PATH] = { 0 };
wchar_t x86Git[MAX_PATH] = { 0 };
wchar_t programFiles[MAX_PATH] = { 0 };
wchar_t programFilesX86[MAX_PATH] = { 0 };
wchar_t minTTYPath[MAX_PATH] = { 0 };
std::wstring cmderStart = path;
std::wstring cmderTask = taskName;
@ -144,9 +153,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
#if USE_TASKBAR_API
wcscpy_s(appId, exeDir);
#endif
#if USE_TASKBAR_API
wcscpy_s(appId, exeDir);
#endif
PathRemoveFileSpec(exeDir);
@ -255,8 +264,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
}
}
PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal");
PathCombine(conEmuDir, exeDir, L"vendor\\conemu-maximus5");
PathCombine(vendorDir, exeDir, L"vendor");
PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal");
PathCombine(conEmuDir, vendorDir, L"conemu-maximus5");
GetEnvironmentVariable(L"WINDIR", winDir, MAX_PATH);
if (PathFileExists(windowsTerminalDir))
@ -319,7 +329,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(cpuCfgPath, cfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir)) {
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
@ -346,7 +356,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(cfgPath, userCfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied."
@ -367,7 +378,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(userCfgPath, cfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
@ -395,7 +407,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(cfgPath, userCfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied."
@ -415,7 +428,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
@ -437,7 +451,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
exit(1);
}
@ -446,7 +460,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if (!CopyFile(cfgPath, userCfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied."
@ -469,7 +484,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
{
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied."
@ -488,22 +504,50 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
}
GetEnvironmentVariable(L"ProgramFiles", programFiles, MAX_PATH);
GetEnvironmentVariable(L"ProgramFiles(x86)", programFilesX86, MAX_PATH);
PathCombine(vendoredGit, vendorDir, L"git-for-windows");
PathCombine(amdx64Git, programFiles, L"Git");
PathCombine(x86Git, programFilesX86, L"Git");
SYSTEM_INFO sysInfo;
GetNativeSystemInfo(&sysInfo);
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
PathCombine(terminalPath, exeDir, L"vendor\\windows-terminal\\WindowsTerminal.exe");
}
else if (PathFileExists(conEmuDir))
{
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
PathCombine(terminalPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe");
}
else
{
PathCombine(terminalPath, winDir, L"system32\\cmd.exe");
}
if (!PathFileExists(windowsTerminalDir)) {
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);
if (streqi(cmderTask.c_str(), L"powershell"))
{
PathCombine(terminalPath, winDir, L"System32\\WindowsPowerShell\\v1.0\\powershell.exe");
}
/*
else if (streqi(cmderTask.c_str(), L"mintty"))
{
if (PathFileExists(vendoredGit))
{
PathCombine(terminalPath, vendoredGit, L"git-bash.exe");
}
else if (PathFileExists(amdx64Git))
{
PathCombine(terminalPath, amdx64Git, L"git-bash.exe");
}
else if (PathFileExists(x86Git))
{
PathCombine(terminalPath, x86Git, L"git-bash.exe");
}
}
*/
}
if (!streqi(cmderStart.c_str(), L""))
@ -524,13 +568,6 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
}
}
if (!streqi(cmderTitle.c_str(), L""))
{
if (!PathFileExists(windowsTerminalDir)) {
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
}
}
if (cfgRoot.length() != 0)
{
if (!PathFileExists(windowsTerminalDir)) {
@ -546,6 +583,11 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
// The `/run` arg and its value MUST be the last arg of ConEmu
// see : https://conemu.github.io/en/ConEmuArgs.html
// > This must be the last used switch (excepting -new_console and -cur_console)
PathCombine(initCmd, vendorDir, L"init.bat");
PathCombine(initPowerShell, vendorDir, L"profile.ps1");
PathCombine(initBash, vendorDir, L"start_git_bash.cmd");
PathCombine(initMintty, vendorDir, L"start_git_mintty.cmd");
if (!streqi(cmderTask.c_str(), L""))
{
if (PathFileExists(windowsTerminalDir)) {
@ -557,7 +599,22 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
}
else
{
swprintf_s(args, L"%s %s", args, cmderTask.c_str());
if (streqi(cmderTask.c_str(), L"powershell"))
{
swprintf_s(args, L"%s -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%s'''\"", args, initPowerShell);
}
else if (streqi(cmderTask.c_str(), L"bash"))
{
swprintf_s(args, L"%s /c \"%s\"", args, initBash);
}
else if (streqi(cmderTask.c_str(), L"mintty"))
{
swprintf_s(args, L"%s /c \"%s\"", args, initMintty);
}
else if (streqi(cmderTask.c_str(), L"cmder"))
{
swprintf_s(args, L"%s /k \"%s\"", args, initCmd);
}
}
}
@ -568,23 +625,42 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
SetEnvironmentVariable(L"CMDER_USER_BIN", userBinDirPath);
}
// Try to find m'intty.exe' so ConEmu can launch using %MINTTY_EXE% in external Git for Cmder Mini.
// See: https://github.com/Maximus5/ConEmu/issues/2559 for why this is commented.
/*
if (PathFileExists(vendoredGit))
{
PathCombine(minTTYPath, vendoredGit, L"usr\\bin\\mintty.exe");
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
}
else if (PathFileExists(amdx64Git))
{
PathCombine(minTTYPath, amdx64Git, L"usr\\bin\\mintty.exe");
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
}
else if (PathFileExists(x86Git))
{
PathCombine(minTTYPath, x86Git, L"usr\\bin\\mintty.exe");
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
}
*/
// Ensure EnvironmentVariables are propagated.
STARTUPINFO si = { 0 };
si.cb = sizeof(STARTUPINFO);
#if USE_TASKBAR_API
si.lpTitle = appId;
si.dwFlags = STARTF_TITLEISAPPID;
#endif
#if USE_TASKBAR_API
si.lpTitle = appId;
si.dwFlags = STARTF_TITLEISAPPID;
#endif
PROCESS_INFORMATION pi;
// MessageBox(NULL, terminalPath, _T("Error"), MB_OK);
// MessageBox(NULL, args, _T("Error"), MB_OK);
if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi))
{
if (PathFileExists(windowsTerminalDir)) {
if (PathFileExists(windowsTerminalDir))
{
MessageBox(NULL, _T("Unable to create the Windows Terminal process!"), _T("Error"), MB_OK);
}
else if (PathFileExists(conEmuDir))
@ -729,7 +805,6 @@ cmderOptions GetOption()
wchar_t conEmuDir[MAX_PATH] = { 0 };
wchar_t vendorDir[MAX_PATH] = { 0 };
wchar_t exeDir[MAX_PATH] = { 0 };
wchar_t cmdInit[MAX_PATH] = { 0 };
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
PathRemoveFileSpec(exeDir);
@ -737,7 +812,6 @@ cmderOptions GetOption()
PathCombine(vendorDir, exeDir, L"vendor");
PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal");
PathCombine(conEmuDir, vendorDir, L"ConEmu-Maximus5");
PathCombine(cmdInit, vendorDir, L"init.bat");
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
@ -868,14 +942,11 @@ cmderOptions GetOption()
cmderOptions.error = true;
}
}
}
if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir))
if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir) && streqi(cmderOptions.cmderTask.c_str(), L""))
{
cmderOptions.cmderTask = L"/k \"";
cmderOptions.cmderTask += cmdInit;
cmderOptions.cmderTask += L"\"";
cmderOptions.cmderTask = L"cmder";
}
if (cmderOptions.error == true)
@ -909,13 +980,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
PathRemoveFileSpec(exeDir);
PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal");
PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal");
if (cmderOptions.registerApp == true)
{
if (PathFileExists(windowsTerminalDir))
{
if (PathFileExists(windowsTerminalDir))
{
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
@ -946,4 +1016,4 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
return 0;
}
}

View File

@ -1,15 +1,6 @@
/* _
___ _ __ ___ __| | ___ _ __
/ __| '_ ` _ \ / _` |/ _ \ '__|
| (__| | | | | | (_| | __/ |
\___|_| |_| |_|\__,_|\___|_|
=============================================================================
The Cmder Console Emulator Project
*/
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "version.rc2"
#include "strings.rc2"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@ -26,6 +17,7 @@
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@ -33,25 +25,26 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
"resource.h\0"
"resource.h\0"
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
@ -60,8 +53,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_CMDER ICON "..\\..\\icons\\cmder.ico"
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
@ -69,26 +61,30 @@ IDI_CMDER ICON "..\\..\\icons\\cmder.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS)
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
FILEVERSION 1,3,6,1
PRODUCTVERSION 1,3,6,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "100904b0"
BEGIN
VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0"
VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0"
VALUE "FileVersion", CMDER_VERSION_STR "\0"
VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0"
VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0"
VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0"
VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0"
VALUE "ProductVersion", CMDER_VERSION_STR "\0"
VALUE "CompanyName", "Samuel Vasko"
VALUE "FileDescription", "Cmder: Lovely Console Emulator."
VALUE "FileVersion", "1.3.6-pre1"
VALUE "InternalName", "Cmder"
VALUE "LegalCopyright", "Copyright (C) 2016 Samuel Vasko"
VALUE "OriginalFilename", "Cmder.exe"
VALUE "ProductName", "Cmder"
VALUE "ProductVersion", "1.3.6-pre1"
END
END
BLOCK "VarFileInfo"
@ -97,7 +93,26 @@ BEGIN
END
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_TITLE "Cmder Launcher"
END
STRINGTABLE
BEGIN
IDS_SWITCHES "Valid options:\n\n /c [CMDER User Root Path]\n /task [Windows Terminal Profile/ConEmu Task Name]\n /icon [CMDER Icon Path] - ConEmu ONLY!\n [/start [Start in Path] | [Start in Path]]\n /single - ConEmu ONLY!\n /m\n -- [ConEmu/Windows Terminal extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@ -105,5 +120,7 @@ END
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -6,7 +6,7 @@ STRINGTABLE
{
IDS_TITLE "Cmder Launcher"
IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [Windows Terminal Profile/ConEmu Task Name]\n /icon [CMDER Icon Path] - ConEmu ONLY!\n [/start [Start in Path] | [Start in Path]]\n /single - ConEmu ONLY!\n /m\n -- [ConEmu/Windows Terminal extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
IDS_SWITCHES L"Valid options:\n\n /a Admin - Native Terminals ONLY!\n /c [CMDER User Root Path]\n /task [Windows Terminal Profile/ConEmu Task Name]\n /icon [CMDER Icon Path] - ConEmu ONLY!\n [/start [Start in Path] | [Start in Path]]\n /single - ConEmu ONLY!\n /m\n -- [ConEmu/Windows Terminal extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
}
/////////////////////////////////////////////////////////////////////////////

2
vendor/init.bat vendored
View File

@ -540,7 +540,7 @@ if "%CMDER_ALIASES%" == "1" if exist "%CMDER_ROOT%\bin\alias.bat" if exist "%CMD
set initialConfig=
if not exist "%CMDER_CONFIG_DIR%\user_init.cmd" (
powershell -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd"
powershell -executionpolicy bypass -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd"
if not exist "%CMDER_ROOT%\config\user_init.cmd" (
%print_error% "Failed to generate Cmder config"