qBittorrent
qBittorrent copied to clipboard
RunAs is no properly supported on Windows
qBittorrent & operating system versions
qBittorrent: 4.4.5 x64 Operating system: Windows 7 x64 Installer: qbittorrent_4.4.5_x64_setup.exe
What is the problem?
I want to run the app as a different or limited user. My current user is user and I use another user qb to run the app with: runas /user:qb <app>
This involves multiple issues:
- All file associations is under
userbecause has been installed for it and click on any torrent file runs the app empty instance. - If try to install directly with the arbitrary user
runas /user:qb qbittorrent_4.4.5_x64_setup.exeRUNAS ERROR: Unable to run - qbittorrent_4.4.5_x64_setup.exe 5: Access is denied.
I suggest several workarounds:
- Add to config the RunAs user to block app execution on any user other than that. Otherwise it starts and allocates configs for the current user.
- Reassign file associations for the arbitrary user:
- Use
runas.exe[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\qBittorrent\shell\open\command] @="runas.exe /user:qb \"\\\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\\\" \\\"%1\\\"\""
- Use a runner or a command line key specifically for that to internally run application by
CreateProcessAsUserAPI:
Or use with the environment variable:[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\qBittorrent\shell\open\command] @="runas.exe /user:qb \"C:\\Program Files\\qBittorrent\\qbittorrent.exe\" --run-as-user \"qb\" \"%1\""
Note: This will require a password input dialog.@="runas.exe /user:qb \"C:\\Program Files\\qBittorrent\\qbittorrent.exe\" --run-as-user \"%QBITTORRENT_RUN_AS_USER%\" \"%1\""
- Use
- Add ability to the installer to install for a specific user including usage
runas.exeor--run-as-userin the shortcuts.
Steps to reproduce
No response
Additional context
No response
Log(s) & preferences file(s)
No response
All file associations is under user because has been installed for it
It's correct behavior, isn't it?
2. If try to install directly with the arbitrary user
runas /user:qb qbittorrent_4.4.5_x64_setup.exebatchfile RUNAS ERROR: Unable to run - qbittorrent_4.4.5_x64_setup.exe 5: Access is denied.
Seems it is due the fact that user has no permissions to qbittorrent_4.4.5_x64_setup.exe or directory where it is located. It's your issue, not the installer's. Just put the installer where user can access it.
Just put the installer where
usercan access it.
I've already did that. It runs w/o runas without an issue.
@glassez is this then still a valid issue ?
@andry81 can you still reproduce on latest stable (4.6.3) ?
@andry81 can you still reproduce on latest stable (4.6.3) ?
@luzpaz Currently I don't have the environment. May be I can tell later when I have a time to test it.