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.03k stars 284 forks source link

[Enhancement] Remove the Windows Server restrictions from the ViGEmBus installer #153

Closed akemin-dayo closed 1 year ago

akemin-dayo commented 1 year ago

The ViGEmBus 1.21.442 installer explicitly blocks installation on all Windows Server OSes, presumably due to the fact that the XInput controller drivers are not installed by default on Windows Server.

ViGEm Bus Driver can not be installed on the following Windows versions: Windows Vista x64, Windows Server 2008 x64, Windows 7 x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 8.1 x64, Windows Server 2012 R2 x64, Windows Server x64.

However, this restriction prevents users from running >= 1.21.442 versions of the ViGEmBus installer on systems that do have XInput controller drivers installed. Some users may also only plan on instantiating emulated DS4 devices, which do not require XInput drivers to begin with.

It would be nice if these restrictions were removed (as was the case in previous ViGEmBus installers), so users would not have to manually install ViGEmBus >= 1.21.442 on Windows Server using the instructions below.

For reference, this issue is occurring on Windows Server 2022 20348.1070 21H2, but it affects all Windows Server OSes.


How to manually install ViGEmBus >= 1.21.442 on Windows Server OSes

  1. Uninstall any older versions of ViGEmBus that may be on your system.
  2. Verify that ViGEmBus was actually uninstalled. a. Check if %ProgramFiles%\Nefarius Software Solutions\ViGEm Bus Driver exists. It should not exist. b. Check if "ViGEm Bus Driver" exists in your "Apps and Features" list. It should not exist. c. If either of these things exist even after uninstallation, you will have to re-download and launch the old installer and click the "Remove" button.
  3. Open an elevated (Administrator) Command Prompt / PowerShell / Terminal session.
  4. cd to wherever you downloaded the ViGEmBus installer, and extract it by running .\ViGEmBus_1.21.442_x64_x86_arm64.exe /extract ViGEmBus.
    • β€» NOTE: decoder.dll can be safely deleted, we do not need it.
  5. cd into the extracted folder β€” it will most likely end up being a random string like 5215C05 due to some strange Advanced Installer behaviour.
  6. If your system architecture is not x86_64, cd again into either the 32-bit or ARM64 subfolder.
  7. Run these commands just to make absolutely sure that any old ViGEmBus device nodes are completely removed.
    • .\nefconw.exe --remove-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318
    • .\nefconw.exe --remove-device-node --hardware-id Root\ViGEmBus --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318
  8. Run these commands to add the new ViGEmBus device node, and install the new ViGEmBus driver.
    • .\nefconw.exe --create-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-name System --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318
    • .\nefconw.exe --install-driver --inf-path "ViGEmBus.inf"
  9. Reboot your machine.
  10. Verify that the correct driver version for "Nefarius Virtual Gamepad Emulation Bus" appears in Device Manager, under "System Devices".
nefarius commented 1 year ago

I will not remove that restriction because I made the setup for individuals, gamers on their home machine running a client OS, not people who use it on cloud machines or in Enterprise setups without ever contributing anything back to the project πŸ™‚

akemin-dayo commented 1 year ago

Ah, so it's intended behaviour. Well, that's fair.

nefarius commented 1 year ago

Ah, so it's intended behaviour. Well, that's fair.

Yes, I'm afraid you suffer the consequences from past abuse of my craft, sorry for the inconveniences but I'll stick to my principles.

akemin-dayo commented 1 year ago

Mnn, sorry to hear about that :/

In any case, it's just a minor inconvenience anyway (though I am… a developer, so not exactly a typical user ;P)

I do mainly use ViGEmBus (+ DS4Windows) on my local Windows 10 machine, I just also happen to have a Google GCE VM that I play around with occasionally since I was given some free credits that have an expiration date ;P

No worries though, it's your project. Really happy to see the new features recently (especially #80 and #83)!

Anopetia commented 1 year ago

@akemin-dayo Thank you so much for this help! Life saver :)

Astrian commented 1 year ago

Thanks, @akemin-dayo, and I understand and appreciate the work by @nefarius. However, is it necessary that put a tip inside the installer to explain this? I was struggling with this problem for two days πŸ˜‚

nefarius commented 1 year ago

I updated the README accordingly. The installer is a 3rd party product, not sure it that is possible, I'll put it on the pile of things to eventually look into πŸ˜›

Nanorulez123 commented 1 year ago

Some home users use server 2022 for the higher uptime ect for 24/7 usage as a game server, most corps would use linux anyway

Masamune3210 commented 1 year ago

Not gonna happen. Not sure why you thought commenting on another issue after being told no in the one you made would end any better

nefarius commented 1 year ago

Some home users use server 2022 for the higher uptime ect for 24/7 usage as a game server, most corps would use linux anyway

And how is that my problem? No means no, this is final. If home users can't figure out how to manually install the driver, how did they end up with an enterprise OS to begin with? Smells fishy.

Masamune3210 commented 1 year ago

As for the argument about uptime, this is my computer running Windows 11 Pro image

No hibernate, no reboot, no sleep. You don't need server to have long stable uptimes, you need a not broken to pieces install