Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Predefined task: as Admin #2929

Open
4 tasks done
xiaoxstz opened this issue Mar 12, 2024 · 0 comments
Open
4 tasks done

[Bug] Predefined task: as Admin #2929

xiaoxstz opened this issue Mar 12, 2024 · 0 comments

Comments

@xiaoxstz
Copy link

Version Information

Cmder version:`1.3.24`
Operating system: Windows 10 Pro(22H2)

Cmder Edition

Cmder Mini

Description of the issue

The predefined task PowerShell::Powershell as Admin (show below)cannot open Powershell as admin

*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%..\profile.ps1'''"

The predefined task cmd::Cmder as Admin (show below) cannot open Powershell as admin

*cmd /k ""%ConEmuDir%..\init.bat" "

How to reproduce

image

image

Additional context

I have a solution for PowerShell::Powershell as Admin . Change the setting to below

powershell.exe -new_console:a -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%..\profile.ps1'''"

The key point is the parameter -new_console:a

Checklist

  • I have read the documentation.
  • I have searched for similar issues and found none that describe my issue.
  • I have reproduced the issue on the latest version of Cmder.
  • I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant