Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Autostart and Per-User Settings #230

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

0xFurtiv
Copy link

@0xFurtiv 0xFurtiv commented Jul 10, 2024

This change adds scripts to enable per-user Raw Accel settings.

There are three primary parts to this change:

  1. A Start Menu shortcut installer script.
  2. A Task Scheduler task installer/uninstaller to run the autorun script at sign in.
  3. Additional guide instructions to enable this feature.

Since Raw Accel applies globally, users sharing a computer needed to manually manage different settings files if they wanted to have different Raw Accel settings. This change solves that issue by setting the working directory of writer.exe and rawaccel.exe to a user dynamic path with %LOCALAPPDATA%, and automatically applying those user specific settings on sign in.

Result of running install-shortcut.ps1:
shortcut

Result of running install-autorun.ps1:
task

This change resolves #113 and is related to #223 #168 #154 #152 #130 #95 #83 #75 #55 #43


Notes:

  1. Settings are stored under %LOCALAPPDATA%\Raw Accel for each user.
  2. If settings don't already exist, we run rawaccel.exe in %LOCALAPPDATA%\Raw Accel to initialize them.
  3. Admin privileges are required to add a global task and to write to %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs.

@0xFurtiv 0xFurtiv changed the title Add user specific settings Add Autostart and Per-User Settings Jul 10, 2024
@JacobPalecki
Copy link
Collaborator

JacobPalecki commented Jul 13, 2024

Hey, ack on this PR. This seems like a sensible idea.
The undercurrent of this idea, I think, is turning Raw Accel's user-side code from a group of loose binaries to a properly installed program managed by the OS. I want to think about the implications of that for a little bit before completing this PR outright. I mean, it sounds like a good direction to be going in. But if we do go in that direction, then some of what you're doing in these scripts ought to probably be done in installer.exe instead.
This is a good time to put up a change like you have because I'm working on a new UI for RA. I don't have a roadmap up on github because so far everyone who works on this just chats on discord (which you're free to join, by the way). But since we're revisiting the user-space side of things, let us mull over exactly what we want to do here for a bit and we can come back and figure out what we want RA to do and how.

@0xFurtiv
Copy link
Author

The undercurrent of this idea, I think, is turning Raw Accel's user-side code from a group of loose binaries to a properly installed program managed by the OS. ... But if we do go in that direction, then some of what you're doing in these scripts ought to probably be done in installer.exe instead.

I think having all of this managed by an installer would be a neat end goal. You could think of this change as an incremental step in that direction.

But since we're revisiting the user-space side of things, let us mull over exactly what we want to do here for a bit and we can come back and figure out what we want RA to do and how.

Sounds good. Here are some questions I would have:

  1. Should we even support per-user settings? (I'd argue YES. Users are already able to personalize their mouse sensitivity natively in Windows. I think we should mirror that behavior when applying Raw Accel settings).
  2. If we support per-user settings, where should they be stored? (I'm thinking it should be somewhere under %HOMEPATH% like %LOCALAPPDATA%).
  3. How would users from previous versions migrate their settings?
  4. Is Task Scheduler the best approach for applying settings when switching between active users?

Until then, feel free to direct those looking for an autostart solution towards this PR.

autorun.ps1 Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autostart plz
2 participants