ShowDesktopOneMonitor icon indicating copy to clipboard operation
ShowDesktopOneMonitor copied to clipboard

Are administrator privileges necessary?

Open PrOF-kk opened this issue 5 years ago • 12 comments

I'm maintaining a personal fork of this project, and it works really well even without Administrator Privileges.
Are you sure they are 100% necessary?

PrOF-kk avatar Nov 30 '20 11:11 PrOF-kk

I'm maintaining a personal fork of this project, and it works really well even without Administrator Privileges. Are you sure they are 100% necessary?

Hi @PrOF-kk ! I don't really remember why Admin rights were used. There can be only 2 variants, I guess:

  • Hotkey assignment
  • Ability to get really full list of currently running applications in the task bar I suggest you to test this app in a User profile (without admin rights), and check if everything works with that. There should be a reason why it required Admin rights, but I don't remember that unfortunatelly. I am not using this application currently, because I am using laptop now, without any additional monitor.

ruzrobert avatar Nov 30 '20 17:11 ruzrobert

@PrOF-kk , checked your personal fork. If it is tested very well, we could merge it to this project, because currently I do not have plans to update this project, due to lack of free time for that. But I consider this project as the only existing solution for the "Hide desktop on one monitor" problem, at least at the initial development time. Maybe something has changed from that time. But I do understand, but it would be great to finish or improve this project. So if you have time for that, we could organize that.

ruzrobert avatar Nov 30 '20 17:11 ruzrobert

Thanks for the quick reply! I'd love to continue contributing here as there's nothing that works as well as this. I will open some other pull requests to port some features from my personal fork but I'm not sure about merging it entirely, as I'm not an expert in C#
If you don't want to deal with other pull requests you can add me as a collaborator to the repository, or you can continue approving each request manually 👍
About the admin privileges: I've been using my fork for about 3 months and it's worked great, so I'll open another pull request to fix this

PrOF-kk avatar Nov 30 '20 17:11 PrOF-kk

@PrOF-kk , I think we should start with just a pull requests, and we will see how it goes 👍

ruzrobert avatar Nov 30 '20 18:11 ruzrobert

@PrOF-kk I'm using your fork since I couldn't perform the 3-key combo consistently. I noticed that some Windows' components like Task Manager and Task Scheduler cannot be minimized by this app, so maybe that's the rationale for administrator privileges?

dreadbalaur avatar Jan 28 '21 14:01 dreadbalaur

@PrOF-kk I'm using your fork since I couldn't perform the 3-key combo consistently. I noticed that some Windows' components like Task Manager and Task Scheduler cannot be minimized by this app, so maybe that's the rationale for administrator privileges?

Hmm, I'm not sure what version I'm personally running now for daily use, however I am sure it is not running under administrator privileges, and those windows minimise correctly for me... I'll take a look after/if #5 is merged, thanks for the info

PrOF-kk avatar Jan 28 '21 19:01 PrOF-kk

@PrOF-kk , could you try to minimize system apps (task manager), without the administrator privilegies, in a User Windows account (not an account with the Administrator rights) ? Thanks!

ruzrobert avatar Jan 29 '21 15:01 ruzrobert

I just tried the latest version (master ef1a76a427b392751e0450dd33ef4975368e5791) both with and without Admin Privileges, in a User Account. I could minimise Task Scheduler and Task Manager with both versions without problems :-/

@dreadbalaur , you could try to manually start up my fork as administrator, see if that solves the problem

PrOF-kk avatar Jan 29 '21 20:01 PrOF-kk

@PrOF-kk It worked perfectly with admin privileges. However, I also realized that it cannot be run by the task scheduler so I have to start it up manually. But keep in mind that I'm using the v1.0-pr release, as I have no idea how to start the other forks: https://github.com/PrOF-kk/ShowDesktopOneMonitor/releases

dreadbalaur avatar Feb 09 '21 02:02 dreadbalaur

I think I found the issue:
ShowDesktopOneMonitor cannot minimise/maximise applications started with a higher privilege than itself, so if it's started as User and another app is started as Admin, it won't work
So, to answer "Are administrator privileges necessary?", "No, unless you want to minimise apps started as Administrator"

@dreadbalaur there's an option is Task Scheduler to start the app as admin
Screenshot from the internet:

PrOF-kk avatar Feb 10 '21 10:02 PrOF-kk

@PrOF-kk, do we need any modifications in the project settings, so the admin rights would be not necessary (but needed if you want to use the program without problems) ?

ruzrobert avatar Apr 06 '21 20:04 ruzrobert

@PrOF-kk, do we need any modifications in the project settings, so the admin rights would be not necessary (but needed if you want to use the program without problems) ?

It's a very simple change: https://github.com/PrOF-kk/ShowDesktopOneMonitor/commit/4392bd753ba14a9798d93187fa5f5a32c29144f8
If the user wants to run as administrator anyway, they can right click -> Run as Administrator

PrOF-kk avatar Apr 17 '21 22:04 PrOF-kk