WindowTop / WindowTop-App

Set window on top, make it dark, transparent and more
Other
1.12k stars 68 forks source link

Implement that the app will ask you to rerun it as admin when user try enable Top-Most / Shrink modes for admin window #241

Closed gileli121 closed 2 years ago

gileli121 commented 2 years ago

Discussed in https://github.com/BiGilSoft/WindowTop/discussions/224

Originally posted by **ruike-kj** May 8, 2022 微软商店购买的wintop,怎样设置以管理员开机启动 ![2022-05-08_111647](https://user-images.githubusercontent.com/78640327/167280200-625dab39-2d3d-4b8a-96b2-bacf314e1089.jpg)
gileli121 commented 2 years ago

First version with the implementation is out: image

If you see this notification below, when you try to do something like set the window on top, the OS will ask you to give WindowTop "admin" access. Note that this will not restart the app!

If you really want to know what happens, then it just creates a background WindowTop process helper with admin access. The main WindowTop instance will communicate with the background admin process.

When a window is identified as "inaccessible", it will use the second background process to send the API requests to OS (things like set it on top, etc)

If you see this: image

And enable for example "Set-Top" mode, the OS will ask you to approve the request. After that, the window will become on top. :) Now, if you will check the toolbar again on that window, you will not see this notification any more.

Because at this point, you already gave WindowTop the permissions.

When you try to enable it via hotkey, the same flow applies. But in case of a hotkey trigger, you will see this notification before the OS request:

image

Few notes: There is still work to do here... Currently, there is some issue with the settings. If you change the settings, you will need to restart WindowTop so the changes will take effect.

I will fix it soon. Other than that, this feature should be ready.

Here is the test version: WindowTop 5.14.0-beta1 - setup.exe.zip

ruike-kj commented 2 years ago

什么时候微软商店的版本可以更新啊

gileli121 commented 2 years ago

@ruike-kj I still did not implement it for the store version. I will work on it today.

I am not sure that I can provide an installer for the store version (for testing it like what I do with the regular version) But I will try

gileli121 commented 2 years ago

@ruike-kj

  1. Here is the store version for testing: https://github.com/BiGilSoft/WindowTop/releases/download/v3.0.8-free/UWP_PackagingProject_5.14.0.0_Test.zip

  2. Extract the zip file

  3. Install the certificate file: UWP_PackagingProject_5.14.0.0_x64.cer image

3.1 image

3.2 image

3.3 image

3.4 image

3.5 image image

  1. Click on the MS Stroe installer: image image

After that, you successfully installed the Microsoft Store test version. If it works as expected, please let me know.

In addition, here is the test version of the regular installer:

WindowTop 5.14.0-beta2 - setup.exe.zip

gileli121 commented 2 years ago

v5.14.0-beta3

Download installer version

WindowTop 5.14.0-beta3 - setup.exe.zip

Download store version

UWP_PackagingProject_5.14.0.0_Test.zip

gileli121 commented 2 years ago

v5.14.0-beta4

Download installer version

WindowTop 5.14.0-beta4 - setup.exe.zip

Download store version

UWP_PackagingProject_5.14.0.0_Test.zip

gileli121 commented 2 years ago

After more testing, I did a few more small hotfixes. Released in v5.14.0 https://github.com/BiGilSoft/WindowTop/releases/tag/v5.14.0