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] Cmder ceases to be compatible with program Admin by Request #2935

Open
4 tasks done
IrisPeter opened this issue May 9, 2024 · 8 comments
Open
4 tasks done

[Bug] Cmder ceases to be compatible with program Admin by Request #2935

IrisPeter opened this issue May 9, 2024 · 8 comments

Comments

@IrisPeter
Copy link

IrisPeter commented May 9, 2024

Version Information

Cmder version: 230724 stable
Operating system: Windows 10 19045.4355

Cmder Edition

Cmder Full (with Git)

Description of the issue

A while back our company installed a Program called "Admin by Request", where the standard UAC is replaced by a requirement to have a Domain account, and then the only way to do things like install programs, update environmental variables, run programs elevated etc is to trigger it through "Admin By Request", running an Elevated Cmd prompt automatically triggers "Admin by Request.", but other things like launching the Environmental Variable editor have to be launched directly by the tool.

When it was first installed I could run both normal or elevated prompts, and by the time the Cmder tab had finished loading you would be able to type.

However a couple of months ago I found that if I run an elevated prompt in Cmder it does indeed trigger "Admin by Request", and you OK the elevation and the typical Cmder tab loading happens, however when it stops running other programs such as where, findstr, locale and git.exe we then see the Lamda λ symbol and a flashing I cursor, at that point when you start typing nothing ever appears.

How to reproduce

  1. Run Cmder
  2. Choose cmd{Cmder as Admin}
  3. Wait for a prompt
  4. Start typing

Expected: whatever typed at step 4 appears, Actual, Insertion point cursor flashes but no text appears

Additional context

Admin by Request: Workstation Edition 8.1.6 (Build 28284)

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.
@IrisPeter IrisPeter changed the title [Bug] Cmder ceases to be incompatible with program Admin by Request [Bug] Cmder ceases to be compatible with program Admin by Request May 9, 2024
@DRSDavidSoft
Copy link
Contributor

DRSDavidSoft commented May 9, 2024

As part of debugging this issue I would like to ask to perform two tests to see what we can do about compatibility with this "Admin by Request" program.

Note

This will help us determine the relevant component that imay be affected by this issue.

Test 1

  1. First, please head over to this wiki page and set up the `CMDER_ROOT environment variable:
    https://github.com/cmderdev/cmder/wiki/Setting-up-Environment-Variables

  2. Now, set up the Cmder's shell to be available from launching a Cmd.exe window
    https://github.com/cmderdev/cmder/wiki/Cmder's-shell-in-other-terminals

Now open an elevated Command Prompt window and run cs to get a Cmder shell. Please report how it works.

Test 2

Please do the following items:

  1. Run other shells in Cmder in elevated mode beside the default one (that is powered by Clink), for example, run the bash and powershell shells. Then report back how it works.

  2. Head over to the vanilla ConEmu's download page over here and download the latest version:
    https://conemu.github.io/en/Downloads.html

Then, run an elevated ConEmu terminal and use the cmd.exe shell (this is the default task in it) and report back how it works.

@IrisPeter
Copy link
Author

Interestingly today whilst having a fiddle to prepare this bug report, I've found that if I right click the tab and choose "Restart or Duplicate" and choose any of the first 3 options then the new split, or the new tab will accept keystrokes, but the original half will still not accept any keystrokes

@chrisant996
Copy link
Contributor

There is an additional repro step:

  1. Have "Admin by Request" installed and configured (with unknown config details).

Step 0 makes it unrealistic for me to try to reproduce the issue. And it sounds like it would likely interfere with running a debugger.

What shell are you using? CMD.exe? If so, then it's also running %cmder_root%\vendor\clink\clink_x64.exe (or x86?) as administrator, and it sounds like Admin by Request would be trying to intercept that. I'm a little surprised the lambda prompt shows up at all.

Clink is what shows the prompt and accepts input at the command line in Cmder. I'm the maintainer of Clink.

Is it possible for you to download .zip files with older versions of Clink and extract to replace the file in vendor\clink\ and narrow down a specific version of Clink that's the first version that doesn't work? I.e. find both the last version of Clink that works, and the first version that doesn't?

If you can narrow that down, then there's a slim chance that maybe Clink is doing something that could be changed to make Admin by Request happy. But I suspect it's more likely that either Admin by Request has changed, or even more likely that an anti-malware suite is really what's interfering (i.e. maybe Admin by Request isn't actually relevant).

Have you tried checking your anti-malware suite to see recent block or quarantine actions it's performed?

@DRSDavidSoft
Copy link
Contributor

DRSDavidSoft commented May 11, 2024

@chrisant996 Quick note, Cmder can display the λ in the prompt if Clink fails, I added it back as a fallback or in case Clink is explicitly disabled by the user using a switch:

prompt $E[1;32;49m$P$S$_$E[1;30;49mλ$S$E[0m

Moreover it can also be displayed on other shells as well, for example Powershell.

In any case I asked the two tests above to see if this issue is even related to Cmder (and/or Clink), it might be an issue with ConEmu, and we don't know if it also happens in any of the other shells.

@daxgames
Copy link
Member

@DRSDavidSoft are you also handling this on the newer performance optimized Cmder run once init.bat template that gets imterpolated into the user owned %cmder_root%\config\user_init.cmd?

@DRSDavidSoft
Copy link
Contributor

DRSDavidSoft commented May 11, 2024

@daxgames Excellent question; I should review the code, I haven't really had time yet to review the development branch that has the speed optimizations in it, that's actually the main reason that development isn't merged into master yet as I would like to review it and make sure these minor details, such as the plain cmd.exe prompt as fallback, is integrated correctly into the new version. Sidenote thanks for implementing it, and once again sorry I haven't yet had time to review it -- in a couple of weeks I'll be done with the current assigned tasks to me at our workplace and I can once again put more time and focus on maintaining and development of the next release of Cmder.

@daxgames
Copy link
Member

@DRSDavidSoft I also need to look at VSCode and see if they have released a version that has our feature request in it so we can update the WIndows Terminal Releases.

@DRSDavidSoft
Copy link
Contributor

@daxgames Exactly, v1.4 of Cmder going to include some exciting changes! (BTW If we drop ConEmu at some point, we can confidently release an ARM64 version of Cmder since currently it's the only dependency of Cmder that doesn't support ARM64 officially)

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

4 participants