Page 1 of 1

Autostart and administrator windows

Posted: Sat Sep 17, 2016 11:57 am
by skalex
First of all thanks for this great little program!

Unfortunately, I ran into a problem I am not able to solve: I'd like XMBC to autostart with Windows 7. This worked fine so far, however, the program runs with normal user rights and I am not able to use the scroll wheel in applications started with administrator rights.

I removed the autostart registry entry and tried to create a new task in Windows Task Scheduler that runs as administrator. The problem is that XMBC obviously needs the option "Run only when user is logged on". But since I log on with my normal unprivileged user I then cannot run the program as admin.

Then I tried to change the compatbility settings by right clicking XMouseButtonControl.exe in Windows Explorer and ticking "Run this program as an administrator". However, then I have to manually enter the admin credentials every time, which is very inconvenient.

Last, I tried to register the XMBC Windows service as suggested in other threads, but my installation lacks the XMouseButtonSvc.exe.

Is there any way to achieve autostart of XMBC for unprivileged users that is able to work in privileged applications?

Re: Autostart and administrator windows

Posted: Sun Sep 18, 2016 5:37 pm
by phil
XMBC should work with privilege windows even when running as a normal user, so long as you install it somewhere under the \Program File folder. It is marked as a Windows Accessibility tool which is allowed to interact with higher priv processes - but that ONLY works when its installed under your default program files folder.

The service was retired several years ago now because it is not needed with the above accessibility mode.

Re: Autostart and administrator windows

Posted: Sun Sep 18, 2016 10:54 pm
by skalex
Thanks for the info, but no luck.

I just verified that the installation folder is "C:\Program Files\X-Mouse Button Control", but still privileged windows fail to scroll.

I also tried uninstalling and reinstalling without changing the default folder at all, but the problem persists.

I can also confirm that "C:\Program Files" indeed is a protected location because I need admin rights in order to make changes in this folder.

Might there be some accessibility option or something similar I have to enable?

Re: Autostart and administrator windows

Posted: Tue Sep 20, 2016 12:22 am
by phil
There shouldn't be anything else to consider. I presume your using v2.13.1 but can you confirm?
Are you logged in as administrator (but without elevated permissions), or a normal user (when you have to enter a different admin account to elevate)?

It worked last time I tried, but I confess that my account is an admin account (I still need to elevate with UAC) but using the same account, not a separate admin account... that works fine but I will check as a normal user!

When you say you cant use the scroll wheel - do you mean at all, or just the "scroll window under cursor" does not work? And have you remapped the scroll wheel in the XMBC setting to something else?


Re: Autostart and administrator windows

Posted: Tue Sep 20, 2016 12:37 am
by phil
OK Ive reproduced the problem...
Its fine if logged on as an admin (that still needs to elevate themselves) - that works.
But logged on as a normal user (where elevation requires the use of an admin account) the scroll window up/down and mousewheel up/down does not work :(

Im not sure what the answer is - it works from the wheel if the wheel is not modified, but as soon as its modified, its a no go... I'll investigate but I fear there wont be much I can do about it.

Re: Autostart and administrator windows

Posted: Tue Sep 20, 2016 3:16 am
by phil
OK, so for whatever reason, the uiAccess token appears not to work for sending messages to elevated windows. Sending input (simulated keystrokes for example) is OK but not internal windows messages.

That means, if you have "scroll window under cursor" enabled (which redirects/sends messages to the window) it breaks scrolling in elevated windows.

I have made a change, that checks the integrity level of the process to see if its compatible - and only redirect the message if it is - please try the next beta (2.14 beta 15 when I release it) to see if it helps (and does not break anything else!). It does mean that scroll window under cursor wont work with elevated windows - in windows 01 this does not matter as the system does that by default anyway (its not needed so you could also just turn the option off if your running windows 10!).

NOTE: there may well be other actions that don't work in this case - but at least the scroll whell should work (assuming the window is active).


Re: Autostart and administrator windows

Posted: Wed Sep 21, 2016 4:01 am
by phil
Ive made a change to 2.14 Beta 16 to fix the broken scroll on elevated windows - its a bit of a workaround but its better than no scrolling!

Re: Autostart and administrator windows

Posted: Mon Oct 15, 2018 2:02 am
by danielsokolowski
Has there been a regression in 2.17? Scrolling does not work for me in applications I choose to 'Run as' administrator, when I temporarily disable x-mouse scrolling does work. My account is a 'Standard user' account and I am on Windows 2008 R2.

Re: Autostart and administrator windows

Posted: Mon Oct 15, 2018 10:29 am
by phil
No there has not been a regression (that I am aware of).
And please explain why you posted your question here in a thread that is completely unrelated?

EDIT: Apologies... having re-read the thread, I realize your question is not unrelated at all... but still, no regression that I know of! If you have found one then it may need further investigation, can you please describe in more detail?
For example, from which version did you come where it worked?

Re: Autostart and administrator windows

Posted: Mon Oct 22, 2018 12:27 pm
by timtak
I would like to be able to auto start your wonderful program X-Mouse Button.

Is there an easy way of doing this? I put a link to the the program in the start up folder, and this works, but it opens the control interface.

I would like to activate a the service (or changes that I have made) to start automatically on start up.

Re: Autostart and administrator windows

Posted: Mon Oct 22, 2018 4:10 pm
by phil
I don't understand. XMBC starts automatically by default (assuming you are using the installed version and you installed it using the same user account)

It puts an entry in the current user's startup registry section - it cant do this for other users (that I am aware of) at install time. So if your logging on as a another user then you can put a shortcut to XMBC in the startup folder of the start menu should you wish (although having duplicate entries may cause the configuration screen to show).

From your second statement "It shows the control window" that would suggest to me that you are indeed starting XMBC twice, one form the startup registry entry that XMBC puts in automatically and one from your shortcut in the startup folder. Take the shortcut out and XMBC should be started just the once by the registry entry. Normally when XMBC is launched (and its not already running) nothing is shown other than the icon in the system tray (by the clock) which is often hidden by Windows these days in the little "expanded" system tray. So my guess is that it was running all along and you just didn't know how to find it?