DreymaR / BigBagKbdTrixPKL

"DreymaR's Big Bag of Keyboard Tricks" for Windows with EPKL
Other
326 stars 32 forks source link

Making EPKL work with Administrator level programs / UAC #44

Open guraltsev opened 2 years ago

guraltsev commented 2 years ago

Thank you for this great program. I decided to switch from using the windows layout mechanism to this one (in particular because windows11 does not have Russian phonetic Colemak and the program to install it under windows 10 does not work under windows 11).

This is not a bug but rather an explanation for a common usecase; please advise if you would like me to post it somewhere else (e.g. one could enable the Wiki here on github, but maybe having selfcontained documentation is best).

I noticed a small issue. If you run EPKL with user-level privileges, then any admin-mode programs do not make use of the configured layout. To see this in action, run any program as "admin" and try typing: windows will be using the base layout and ignoring EPKL. To solve this issue, one must run EPKL with admin rights. Making it run on startup with admin rights is slightly involved (it is best to schedule it as a task) especially if you do not want to be prompted by the UAC every time.

Below I illustrate the steps to enable EPKL with admi rights.

Running EPKL on logon using Startup link

Disadvantage: Nags you with a UAC screen

Step 1:

Open the Run dialog. Either press Win+R or go to Start menu, type r u n, and select the Run app:

image

In the resulting dialog type shell:startup image

The explorer window will open to the startup folder

Step 2:

Create a shortcut to EPKL.exe in this place image

Step 3:

Make EPKL run as Administartor. To do so left-click on the shortcut, select Properties, go to the Shortcut tab, click the Advanced button and check Run as Administrator image

image

Conclude by clicking Ok

Step 4:

You are done, try running it by clicking the shortcut. You will get the UAC prompt as you will at every startup but at least it works.

Running EPKL on logon using Startup link

Disadvantage: Slightly more complicated Advantage: No UAC nagging

Step 1

Start the Task Scheduler by opening the Start Menu and searching for Task Scheduler image

Step 2

Create a New task by clicking entry on the right image

Step 3

Give it a name e.g. EPKL and a optionally a description. Maybe mention that it was created by yourself so that if you need to remove it later you are not scared of removing something more system-related. Important: Check the option "Run with highest priveledges"! You may also select "Configure for: Windows 10" but I am not sure this is necessary

image

Step 4

Assign the action to run. Go to the Action tab and click new. As an action, select Run program and browse for where EPKL.exe is.

image

image

image

Copy the path to the directoy containing EPKL as the "start in" option. (I do not know if this is mandatory) image

Finish by clicking OK

Step 4

Go to the Conditions tab and disable limitations on power source for running this task

image

Step 5

In the Settings tab make sure to disable stopping the service if it runs for more than 3 hours. Also enable running if schedule is missed

Other settings are self-explantory and you can change them to your liking. Here is a reasonable choice

image

Step 6

Finally go to the "Trigger" tab, click "New", and select "At logon" with Specific user set to your user

image

image

If the user displayed is not your user (should not be needed) click on "Change user" -> "Advanced" -> "Find Now" and select your user from the newly populated list

image

image

image

Step 7

Close the task creationg dialog and you are done. Try logging out and logging in to see it work.