Updating fails

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
User avatar
4c3T
Member
Posts: 19
Joined: Sat May 27, 2017 11:10 am

Updating fails

Post by 4c3T »

Please fill in this template when posting!
XMBC Version: 2.19.2
Installed or Portable version: Installed
Windows Version: Windows 19 Server
Mouse Information (brand/model): Deltaco Gaming Mouse GAM-019
Relevant Computer Information (CPU, RAM etc): 2 x AMD Opteron 6378 16-core, 24 GB ECC
Did the problem occur after an upgrade of XMBC? (If so, from what version?): Not the first time this has happened throughout the versions over the years
Did the problem occur after a Windows update/upgrade? (If so, from what version?): Nope.
How long have you used XMBC?: About 5 years now I think
What language and keyboard layout do you use in Windows?: Swedish

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).: Automatic update fails.
Usually I update manually when this happens, but this time I took a look at the log file and found this entry:

Code: Select all

15-08-2022 10:36:36.059> X-Mouse Button Control v2.19.2 (x64) Startup. Commandline '/notportable /delay'
15-08-2022 10:36:36.064> Running in high integrity mode (0x00003000)
15-08-2022 10:36:36.089> Loaded 10 application specific profiles (10 normal and 0 custom window).
15-08-2022 10:36:36.095> Running on Microsoft Windows Server 2016 Datacenter Edition (build 17763), 64-bit, Hook Timeout: 1000 ms
15-08-2022 10:36:36.095> Startup folder: 'C:\Program Files\Highresolution Enterprises\X-Mouse Button Control\'
15-08-2022 10:36:36.095> Settings (and log) folder: 'C:\Users\Administratör\AppData\Roaming\Highresolution Enterprises\XMouseButtonControl\'
15-08-2022 10:36:36.232> HookThreadProc[0x2E28]: Using keyboard language 0x041D041D
15-08-2022 13:28:43.865> Reinstall mouse hook on resume is enabled. Resetting hooks on session logon...
15-08-2022 13:28:44.157> HookThreadProc[0xFC4]: Using keyboard language 0x041D041D
16-08-2022 09:14:53.353> Reinstall mouse hook on resume is enabled. Resetting hooks on session logon...
16-08-2022 09:14:53.644> HookThreadProc[0x3D4C]: Using keyboard language 0x041D041D
16-08-2022 23:05:53.553> There is a new beta version available! (2199906)
16-08-2022 23:05:55.887> Downloading X-Mouse Button Control v2.20 Beta 6...
16-08-2022 23:05:55.903> Unable to delete old update file 'C:\Users\ADMINI~1\AppData\Local\Temp\\XMBCUpdate.exe'
16-08-2022 23:05:55.908> Unable to delete cached download 'https://www.highrez.co.uk/scripts/download.asp?package=XMBCUpdateX64Beta&newversion=2199906&oldversion=21920'
16-08-2022 23:05:56.381> Unable to download the update package. Please visit the website or try again later. (Error code -2146697208: Det gick inte att hämta den angivna resursen. )
16-08-2022 23:05:59.719> CMyMessageWnd::OnSetup   -   Opening setup dialog.
16-08-2022 23:05:59.842> Loaded 10 application specific profiles (10 normal and 0 custom window).
I am using the admin-account this time around, which contains the letter "ö" which sometimes creates confusion with some apps trying to write to the %USERDATA% folders and sometimes they substitutes the "ö" with some other letter (Administratör is commonly seen).
Although, don't think it's the case this time. Looking at the path it's trying to write to, I think it messes up the actual path with one additional backslash

Code: Select all

'C:\Users\ADMINI~1\AppData\Local\Temp\\XMBCUpdate.exe'
Since it's using the 8.3 file naming scheme, I don't see that it's the letter "ö" that creates this problem.

In other installations I've used another account name which didn't contain any Swedish "ÅÄÖ", and yet I still had this problem. Can't say for sure it was the same exact problem since I didn't check the logs back then, but I would think it's indeed the same exact problem since every attempt to re-download failed before it even started to download anything.
At other times, it's been working flawlessly on my laptop and other computers, and just about equally as many times it failed with the updates, so I'm not sure what to make of this.
Maybe this is a bug, or I've done changes & tweaks to the OS that doesn't agree with X-Mouse's environment somehow? :shock:
The more, the merrier, but not with people. Those we can do with less of. Save Earth, stop procreating :!:
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

Urm, there is no update to 2.19.2 (unless your trying to update to the beta version??)
Not sure what would be the cause, if there a file XMBCUpdate.exe in the temp folder? Do you have permission to delete it? It seems to be complaining that it cant delete the old file. And yeh - I cant see how the character could be a problem with 8.3...

Bit of an odd one - I may have to setup a swedish windows VM to test that out (that might be tricky!)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
4c3T
Member
Posts: 19
Joined: Sat May 27, 2017 11:10 am

Re: Updating fails

Post by 4c3T »

Yeah, I have beta updates checked in updates-tab.

Also, no executable by that name exists, and the program should run as admin with full rights. I've disabled the UAC via the registry so that I'm in control (I really REALLY :oops: hate having demented dialogs popping up with ding-dong sounds that would wake the cremated dead (I have audio set on high), besides, I can't understand why MS even decided to dumb things down to that level instead of forcing users to learn how to use an OS in the first place!) of what happens with the system.

If you decide to install a VM, I recommend using Google Translate. Fairly accurate, but you can get weird translations at times (D)

Edit: I even tried copying some random .exe file and renamed it to "XMBCUpdate.exe" - No result, still errors.
Also tried changing the permissions on the temp folder and added "Everyone" - Still same crap, and I didn't go any further back than the that folder.
I feel it's missing a folder in that path. With the extra backslash I mean. Could this be the case, or is it just one of those quirky things that you programmer do..?
The more, the merrier, but not with people. Those we can do with less of. Save Earth, stop procreating :!:
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

Stranger still...

If you copy the path from the log (without the filename) and paste it in to explorer, does it take you to the right/valid place?
Interesting about UAC, I don't think I've ever tested XMBC with it turned off (turned down perhaps but not off completely) - I wonder if that's related!...

I don't know your experience, but in my experience trying to teach some people how you use a computer, I'm actually glad for UAC - I hate to imagine how my bad parents PC's would be without it (its bad enough with it causing them to stop and think for a second - although I guess the usefulness wear off over time as people get used to accepting the prompt!)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
4c3T
Member
Posts: 19
Joined: Sat May 27, 2017 11:10 am

Re: Updating fails

Post by 4c3T »

phil wrote: Wed Aug 17, 2022 7:51 am Stranger still...

If you copy the path from the log (without the filename) and paste it in to explorer, does it take you to the right/valid place?
Interesting about UAC, I don't think I've ever tested XMBC with it turned off (turned down perhaps but not off completely) - I wonder if that's related!...

I don't know your experience, but in my experience trying to teach some people how you use a computer, I'm actually glad for UAC - I hate to imagine how my bad parents PC's would be without it (its bad enough with it causing them to stop and think for a second - although I guess the usefulness wear off over time as people get used to accepting the prompt!)
I get to the right folder, "C:\Users\Administratör\AppData\Local\Temp", unless, as I wrote, there's a folder missing at the end of that path.

I've got 30 years worth of computer experience, so most of the time I know what I'm doing. And, yes, I know some people lack understanding, but many of the times, it has to do with them not understanding how things work or should work for that matter, and MS is not making it any easier for its users, so instead they dumb things down to the point where some things become almost useless and requires tweaks and hacks to circumvent them.

Personally, I can't stand that UAC and same with the recycle bin function. I always set that to remove directly, but with confirmation (Default is off when disabled, for some idiotic reason!), other things that are stupid defaults are large icon view in explorer and hidden files/folders and not showing system files. This leaves the users confused when they can't find certain files, or sit there with 3-4 icons that looks exactly alike and have the same name and they don't know what to do with them.
Thankfully, there are options to remedy that.
The more, the merrier, but not with people. Those we can do with less of. Save Earth, stop procreating :!:
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

No folder missing - it should just download the update the the temp folder.

Just had a look at the code, the error deleting the old file, and the error deleting the cache are probable not important (its probably just becuase the files are not there to be deleted (not really an error - it should probably look first!)).

I guess the actual error is that it cant download the update. I wonder, can you download it manually using the URL in the log?
https://www.highrez.co.uk/scripts/downl ... rsion=2192
The call to system function URLDownloadToFile is failing but with an error that is not listed - not clear what it is, but something (a DLL?) wasn't found I think...
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
4c3T
Member
Posts: 19
Joined: Sat May 27, 2017 11:10 am

Re: Updating fails

Post by 4c3T »

phil wrote: Wed Aug 17, 2022 9:20 am No folder missing - it should just download the update the the temp folder.

Just had a look at the code, the error deleting the old file, and the error deleting the cache are probable not important (its probably just becuase the files are not there to be deleted (not really an error - it should probably look first!)).

I guess the actual error is that it cant download the update. I wonder, can you download it manually using the URL in the log?
https://www.highrez.co.uk/scripts/downl ... rsion=2192
The call to system function URLDownloadToFile is failing but with an error that is not listed - not clear what it is, but something (a DLL?) wasn't found I think...
Yes, downloading the file works flawlessly, downloaded the XMBCUpdateX64.2.20 Beta6.exe.
Tried two things, copying that file to the temp folder and another copy that I renamed to XMBCUpdate.exe and then ran the updater. Still got the same error, but it removed XMBCUpdate.exe this time.

Ok, but if the error is because of an DLL, I'm not surprised as they tend to fail.
This is quite a hassle when it comes to programming. Basically everything in Windows (Or any other OSes for that matter) is basically a house of cards. Tons upon tons of "#include" everywhere, and on top of that these DLL files and when those fail by wrong version (usually older that doesn't contain that section) they fail, and Windows, or rather the programmers loves to spit out code which you then have to have a PhD in Googling (For us normal persons that is) to find out what the F it means, and what army of files causes that, then you have to back trail the problem to the source (Basically a the highlight of the movie Matrix). 3rd party programmers on the other hand are usually more adept to these problems and usually find the errors and nips in the butt.

I should also mention that this current setup I'm running isn't playing ball 100%. I've had some connectivity issues earlier (Windows 10 Enterprise) when Hard Disk Sentinel (HDS) refused to update, and I think that was because of some screw-up in Windows networking, but I haven't had that problem since I installed Windows 19 Server. I spoke to that guy who makes that and he couldn't make heads or tails out that issue, so that's when I installed Windows server.
Initially, I had some trouble with some basic functions, like performance counters that wouldn't start properly as I'm also running StableBit DrivePool which shows activity using these counters.
Tried their suggestions and nothing happened.
Then, suddenly a couple of weeks later when I, by chance, was fiddling around with the DrivePool software (basically just opened it) and it was working, for no reason and I can't recall what I've done or how, but it's running.

I swear, if I wasn't so hopelessly dependent on my computer, and they were dirt cheap I'd strangle this one out of existence. Pretty nice rig otherwise, 2 x 16 core so it's got potential and that, but aaarghh...
First clean installation of Windows 10 refused to run Windows update, just kept looping: Downloading, installing, failed.... Downloading, installing, failed. Googling didn't help much, but eventually I downloaded a fresh ISO and that worked. Then came the issues with HDS and a few other minor issues.
The more, the merrier, but not with people. Those we can do with less of. Save Earth, stop procreating :!:
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

It does rather sound like a system problem... URLDownloadToFile (that is failing in this case) is in Urlmon.dll (A standard windows COM component) - but what that depends on, god only knows. I'm only making an assumption about the DLL failing, it could be failing for any number of reasons I guess but this is not something anyone else has reported (there are not millions of users of XMBC but there are enough (that often have weird setups) to expect this to reported by others if there was some common cause).

The fact that you can download it manually I think rules out network problems somewhere, although if you have any software firewalls you might want to check XMBC itself is not being blocked to access/download over HTTPS (port 443).

I'm not sure what else to suggest/do here!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
4c3T
Member
Posts: 19
Joined: Sat May 27, 2017 11:10 am

Re: Updating fails

Post by 4c3T »

Hmm... Not entirely sure, but I think this problem arose before I turned on the firewall (Shortly after the installation I turned it off along with the antivirus). I can't for the life of me understand why why why MS decided to have that bad security management. Not even in the slightest user friendly. The exact opposite in fact. First of all, if you disable it it constantly remind you to death about it, this & that being disabled.
If you do have it enabled, you'll have an hell of a time to exclude folders stay the F away from, as it more than happily removes first, ask questions later and sometimes fail to restore them, and it's all tucked away so that it will take you a sweet minute to find the restore butt... Wait.. Not a button - A stupid-ass pull down menu with a sketchy link you'll have to click and wait for it to finish. I don't have to point out that I loath the UI do I..? So ugly & stupid. That was only the antivirus part of it.

The firewall is an outright nightmare. Sure, pop-ups is easy enough to deal with, but that's the extent of it. If you click advanced, and if you're a novice user you'll sh** your pants trying to understand what any of this stuff does, only to turn your butt into a spray can when you're trying to actually add & modify a rule and you're in the midst of trying to decipher what to do with IP addresses, networks, users :cry: :oops: :?:

Had they been smart they would've bought that firewall that everyone was using for XP, which I can't remember quite right now. It was sort of good. Annoying AF, but good since it kept popping up every single request that any app & IP did in any direction. That could've been further developed and simplified. Had a decent UI and it could be configured with some ease, and it actually made sense.

Another thing about Windows app API or whatever to call it. It's remarkable that MS chose to make things like control panel as an app. We've all had that problem when some program makes that changes in the account in some obscure files and/or folders that renders the entire thing useless and the only way to fix it is to create a new account.
Now, in contrast. Security Center is basically the exact same design and isolated, morbidly so in fact. No access to NTFS permissions for the files and can't be modified in pretty much any way without resorting to put the drive on USB and take ownership (which will corrupt the whole thing anyway).
How come they didn't use this for the control panel and such apps I wonder and keep the app-API for 3:rd party devs.


Ahh... Mind goes blank thinking of how messed up some things are.

Anywhoo, I'll keep my eyes open for the next update attempt and see if it persists, and if it does I'll add a firewall exception or disable it and see if that makes any difference. :cheers:
The more, the merrier, but not with people. Those we can do with less of. Save Earth, stop procreating :!:
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Updating fails

Post by Dolmatov »

I got a similar problem when upgrading from 2.20 beta 4 to beta 6. I just received the update notification today.
The program showed the progress of the download, but did not start the installation. A page was opened in the browser about the completed update.
Performed a manual update.
Windows 11 system, UAC is in use (there was a request).
No logs (overwritten).

Code: Select all

https://www.highrez.co.uk/scripts/postinstall.asp?package=XMBCUpdateX64&major=2&minor=20&build=0&revision=6&platform=x64
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Updating fails

Post by Dolmatov »

XMouseButtonControl_log.zip
Repeated with the stable version. The installer is downloading, the UAC request is approved. The update fails (the old version remains).
The temp folder contains the XMBCUpdate.exe 2.20 Beta 6 file.
XMBCUpdate.zip
Running this file manually updates the program.
You do not have the required permissions to view the files attached to this post.
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

I think this is a different issue as the download succeeds. If the browser opens with "installed" page, then the installer (updater) ran. It must have failed to kill the existing instance - and thus couldn't overwrite it. Certainly not the same problem - but something to look into!

Thanks for the log, I'll try and remember to look at it when I get a moment - don't suppose it will have much info unless you had debug turned on though :)

Maybe I will make beta 7 with just the two language files, to further test the update process... If I do, it may be worth enabling debug logging before updating!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Updating fails

Post by Dolmatov »

I agree that the problem looks different. According to the log, I did not see any problems, although I turned on debugging. For my part, I can't guarantee that I know what to look for. According to the log, a restart is in progress. Added more entries so that there is less text. The latest entries are made with checking for automatic updates and starting the update process, without manually closing the program. The debugging process did not turn on.
XMouseButtonControl_log2.zip
Additionally, I performed a check through Process Monitor.
23.08.2022 23:38:44 | SUCCESS

Code: Select all

Command line:	C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\Highresolution Enterprises\X-Mouse Button Control\XMouseButtonControl.exe" /exit
23.08.2022 23:38:44,9125376
Thread Exit | SUCCESS
23.08.2022 23:38:45,7442184
Process Start | SUCCESS

23.08.2022 23:38:48 | CANNOT DELETE

Code: Select all

C:\Program Files\Highresolution Enterprises\X-Mouse Button Control\XMouseButtonControl.exe

Code: Select all

C:\Program Files\Highresolution Enterprises\X-Mouse Button Control\XMouseButtonHook.dll

Code: Select all

C:\Program Files\Highresolution Enterprises\X-Mouse Button Control\BugTrapU-x64.dll
XMBCUpdate
Logfile.zip
XMBCUpdate+XMouseButtonControl
Logfile2.zip
Unfortunately, I did not see the function of creating a log for the update installer in the mode of writing debug logs - launching XMBCUpdate with an additional parameter. This could provide more information.
According to the current data, I see that the process starts before trying to write files. It's strange, like something broke in the installer's algorithm.
You do not have the required permissions to view the files attached to this post.
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Updating fails

Post by phil »

It is strange - I havnt changed the installer at all so I doubt the problem is in there.
Maybe XMBC is not receiving the exit message (a new instance of XMBC is started with the /exit flag as you saw. That instance sends a message over IPC to the existing running XMBC, telling it to exit) I suspect something is wrong with that IPC communication pipe. What that is though may be tricky to narrow down!

Havnt got time to look at it right now though
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
User avatar
Dolmatov
Committed
Posts: 149
Joined: Tue Sep 19, 2017 9:19 pm

Re: Updating fails

Post by Dolmatov »

The issue is currently not a priority, so treat it as you wish. There may be something wrong in compatibility with the system or antivirus. It is hard to say. It will be possible to return to the problem if it repeats itself for other users or on the test machine from your side.

I recommend thinking about adding logging (manual) to the installer, and passing the debugging parameter to the main program when you enable a similar option in the main program. I think this will make it easier to check for problems with the update.
I also recommend checking the activity of the process immediately before file operations, or use taskkill to force the process to terminate.
These actions are recommended to optimize the installer's capabilities, so it is not necessary to spend a lot of time implementing them.
Post Reply