nefarius / ViGEmBus

Windows kernel-mode driver emulating well-known USB game controllers.
https://docs.nefarius.at/projects/ViGEm/
BSD 3-Clause "New" or "Revised" License
3.08k stars 285 forks source link

Error Code 2503 #91

Closed akaXyle closed 3 years ago

akaXyle commented 3 years ago

When I try to install the application I just get an error code. I have tried installing 7 times now. Windows 10 1909 Driver 457.51 issue

nefarius commented 3 years ago

That's an issue with Windows Installer that has popped up frequently this week for unknown reasons. The setup works as expected, yet unfortunately can't write to a temporary folder. Two methods have been reported by affected users to work:

Let me know if that worked. Good luck.

akaXyle commented 3 years ago

I fixed the permissions of the TEMP folder and it worked! Thank you!

Rocky04 commented 3 years ago

The permissions for "C:\Program Files" (owner TrustedInstaller) and "C:\Windows\Temp" (owner SYSTEM) needs to be correct because the installer will first unpack the data into the Win temp folder and then copy them into the programs folder.

Edit: How it should look like for the programs folder. You need to open the properties for these folders, then select the tab permissions and then click on the button advanced to get to this view. If you aren't able to enter that window as an admin you don't see this and so you can't change the permissions anyway. Meaning you aren't privileged to do that. image

How it should look like for the Win temp folder. image

The detailed special user group permissions (the name for that group depends on the OS language, here it's German) for that element from the above list (when this element was entered and the view is switched to show specific permissions). image

nefarius commented 3 years ago

The permissions for "C:\Program Files" (owner TrustedInstaller) and "C:\Windows\Temp" (owner SYSTEM) needs to be correct because the installer will first unpack the data into the Win temp folder and then copy them into the programs folder.

I wonder what broke it though?! The way the Windows Installer works (and the setup which builds upon it) hasn't changed in a long time, did a Windows Update alter permissions on accident?

The setup can be invoked as non-Admin; once it requires elevated privileges the UAC will pop up. Somehow it already breaks at an earlier stage (I guess when it extracts the temporary copy of driver and devcon to prepare for installation).

Rocky04 commented 3 years ago

A (partial) failed / incomplete system upgrade (going from Vista / 7 / 8 to 10), very bad applications (mailware) or bad user actions can cause this. I'm not aware of another thing which messes with it.

Edit: Wooting uses this software since a few days to emulate a controller to replace the Double Movement behavior in Fortnite so a deeper strafing angle can be archived in that game with any keyboard (https://github.com/WootingKb/wooting-double-movement). So expect a lot more users due to the hype, because Epic seems to allow controller emulator nowadays.

nefarius commented 3 years ago

Wooting uses this software since a few days to emulate a controller to replace the Double Movement behavior in Fortnite so a deeper strafing angle can be archived in that game with any keyboard. So expect a lot more users due to the hype, because Epic seems to allow controller emulator nowadays.

Yay, more donors finally! 😆 (SCNR)

Kanuan commented 3 years ago

Step-by-step guide on how to fix Windows' Temp folder permissions

WARNING! READ THIS!

KEEP IN MIND THAT...

THE GUIDE

ACCESSING THE Temp FOLDER PERMISSIONS

VERIFYING IF INHERITANCE IS DISABLED

VERIFYING THE FOLDER OWNERSHIP

EDITING PERMISSIONS ENTRIES

Applying the new settings

After Windows finishes applying the changes, try running Vigem's installer again and it should succeed now.

Rocky04 commented 3 years ago

The guide above should may include the note to disable inheritance for these folders if present and to check the option for replacing the permissions for the child elements for them so that the elements inside the folders get them too to avoid other problems.

Nice guide... But overall, I think if people don't know what to do it's maybe better to not mess around with these permissions at all because it can get worse.

Kanuan commented 3 years ago

This is the type of situations where I want to help but it's difficult to cover every possible scenario. I didn't want to just say "go google it" to the users with this issue for the reasons you mentioned: following a bad guide can lead the user to an even worse scenario.

This guide is based on top of how other users solved this on the discord server's support channel, where nobody yet appeared with way too broken permissions and what is shown here worked as normal. I posted this here since I'm making a Vigem troubleshooting section and wanted to include this issue since it has become more frequent, so I just left a link from the article to here.

All in all, I agree with you in that messing with permissions is dangerous when one doesn't know what they are doing. Let's see what @nefarius ' thoughts are on this.

Depending on how this proceeds, I can:

Rocky04 commented 3 years ago

You misunderstood me and it should be obvious that I tried to improve your guide. There is no need to delete it.

I think it's good to have different views / opinions. There was a reason why I haven't shown in detail (with pictures) how to get to the permission view because I think that people who don't even understand the short description from me, should not mess with them anyway. But I also don't want to deal with explaining everything, like why there should be these settings and what they do. I think a good guide would do that kind of things because if a user follows them without knowing what they are actually do, the chance is high that they do something wrong. Also some people need a video because otherwise they don't understand it.

Also there must be a reason why some users have this problem and I think the most likelihood is that they used strange tools or they broke them by their own manually.

So again, your guide should include these things:

Kanuan commented 3 years ago

@Rocky04 I've updated the guide with what you suggested, but I'm personally confused on the apply permissions within the container.

I don't know if you are talking about this: image

or this: image

Rocky04 commented 3 years ago

The first as you already updated it.

The inheritance from higher rank folder should be removed entirely, not converted. Maybe some people have applied some weird permissions on the entire partition. Or have added some denials for the entire Windows folder.

Squall-Leonhart commented 3 years ago

doesn't the Uninstall/Install Fixit Wizard resolve this?

https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d

ghost commented 3 years ago

Thanks man.

Rocky04 commented 3 years ago

In the case someone is interesting why the file owner of the folders matter I think it comes down to User Interface Privilege Isolation.

The access-control list (ACL) of Win not only handles the file permissions, it also handles the Integrity Level (untrusted, low, medium, high & system). Every user or account has a default level and you can only see the current level in the permissions of a file or folder when the default level is manually overwritten / changed. So as a normal user the level of a normal started process is medium, but if the process is started as admin the level would be high. A process can't access files which have a higher level. A child process can have the same or a lower level (sandboxing) and so limited the potential access even the file permissions would allow it.

So if the installation is started within the system temp folder and the owner isn't system the level would be lower and so limited. Like installing a driver needs at least a high level so that the ViGEm bus driver can't be installed if the file owner is a user account and so only has a medium level.