-
-
Notifications
You must be signed in to change notification settings - Fork 121
Help code a platform
Want to help with the account switcher and have some tech knowledge? Great! Even if you have little experience coding, but a good hold understanding of Windows and filesystems, you can help!
And, good news! With version 5.0 (2022-01-30_00) adding platforms has become a LOT easier!
See this in video form: Below is a guide that covers the basics of adding a platform, as well as diving DEEP into extra features and possibilities. This will be missing features and more as it won't be updated as often as the Wiki page.
The account switcher works by swapping registry keys and files out for files it has previously saved. The ability to add a new platform is finding what files/registry keys are edited, and then building the "swapper". Finding out what files are edited is half the battle. This is where most people can help, especially when a platform is acting up or unreliable is being switched.
After collecting info, create an issue with your info so I or another contributor can begin work.
Think you can help collect file names and locations for a switcher? Awesome! There are multiple methods I've used:
This is a simpler method, but you need to be somewhat tech-savvy to understand where the program is hiding files. Effectively you make a 'snapshot' by copying a folder, then after logging in with another account: You compare the snapshot to the live folder.
Most of the time, tokens and login usernames/info are stored in files. Where do you find these files? Usually in %AppData%
, %LocalAppData%
or Documents
. Most programs are installed into %ProgramFiles%
, but are usually not modified there due to permission levels. For this, I suggest you use WinMerge.
- Sign in with an account.
- Copy all of the program's folders you've found either by intuition or a search to a folder. For example I'll copy:
%LocalAppData%\Spotify
to a folder calledSpotify\Local
and%AppData%\Spotify
toSpotify\AppData
. - Sign out of the platform, and then sign in with a different/new account.
- Open WinMerge and drag the live folder in (This sets the path in the
1st File or Folder
spot). Example:%AppData%\Spotify
. - Drag and drop the snapshot folder into the
2nd File or Folder
textbox. Example:Spotify\AppData
. - Click
Compare
and wait for it to complete. Files that are different are highlighted. Missing files on either side are shown asLeft only
orRight only
- See the top of the screen for which folder is in what direction.
You can now delete the backups/copies of your folders to save disk space.
Some programs store tokens and required info in the Registry. This is easier to comb through, but not always required. The program I use for this is RegistryChangesView by Nirsoft (Download)
- Sign in with an account.
- Open RegistryChangesView and select
Saved Registry Snapshot
underRegistry Data Source 1
. - Click
Create Registry Snapshot
to backup the current registry. Tick everything but...\SAM
and...\Security
, then clickCreate Snapshot
. - Sign out of the platform, and then sign in with a different/new account.
- Select
Current Registry
underRegistry Data Source 2
. - Click
OK
- You can now comb through the list of changed registry files by looking at the
Registry Key
column, and looking for the name of the program/developer/code-name for the program. You're looking for anything that points to an account, token or username - these are important. Anything else may likely not have anything to do with swapping accounts.
You can now delete the backups/copies of your registry to save disk space.
This method has a ton of extra info to dig through, as it logs EVERYTHING going on in your computer. Every file and registry change appears on a list. You can filter, but there's a ton going on. For this, I suggest you use Process Monitor from SysInternals (Microsoft) to collect file names/registry keys that processes interact with. You will need to look up a guide for this, but to put it simply: Filter captured file changes by adding the following rules:
-
Process Name
is
steam.exe
thenInclude
< This makes sure that only changes made by certain processes are monitored, for example; Steam. - If it has multiple processes, add them all, so add say:
Process Name
is
steamservice.exe
thenInclude
- If you see a lot of other info we don't need, then don't be afraid to exclude it. For example:
Operation
is
TCP Recieve
thenExclude
< to hide all incoming TCP network traffic. ExcludeTCP Send
andTCPCopy
as well, for example.
You will be looking for files such as configuration/storage files like .cfg
, .json
, .yaml
, .yml
. .vdf
and any changes in Steam's config
directory for example. For the registry, look out for anything in the platform's 'subfolder', including the platform's name or odd keys it interacts with.
You will need to log in and out 2-3 times to collect reliable info on what files it edits. When you're certain a file is or is not related, don't be afraid to exclude it to make searching easier using the filters.
Once you have a list of files, you can take an extra step: Testing whether a switcher would work. Odds are, it would. As long as you don't click "Log out" those 'saved tokens' should be active until they expire. Swapping them in allows you to 'switch accounts'. You can copy all of these files you have collected into a new folder, and make a simple text file for all the registry keys (if any) and their values.
Once you have a backup, deleting the files is usually enough to "log out" (without actually clicking log out). After logging into another account, backup these new files again. Kill (end the process) through Task Manager completely, swap the files and registry keys, then start it again to see if you have successfully switched accounts. Oftentimes platforms will modify the files on each new start and need to be backed up again. Without these small changes being saved again, the 'backup' won't work.
If you can, take the extra step and see which files are REQUIRED to be changed, and which are optional (or just "storing info" rather than "storing info for immediate use" - such as a cache vs a database, for example).
To test registry changes, you'll need to use Regedit
(Type that into the Start Menu) to manually edit values. This is safe, as long as you're not messing with Windows registry keys. It's not as scary as some believe.
If files need to be saved each time an account is switched, a unique ID or username found in one of the files is important to save the file without the user needing to save it manually while swapping accounts. Usually, a unique ID or username is stored in a file and can be read. Look in each of the modified files for a "last logged into", "unique ID", or something of the sort. Good software to use would be Notepad++ for text files and HxD for binary files. The latter is usually much more difficult to use, but if you notice a username in a bunch of 'nonsense' then do make sure to take note of it and its location. Absolutely do include this info in your issue.
Sometimes platforms change file names or the ways they store things, breaking the account switcher. For example, Ubisoft changed their Ubisoft Connect filesystem for accounts and broke the account switcher temporarily. Usernames could no longer be grabbed from a log file using an accounts ID, collected from one of the files. the user.dat
folder was changed to users.dat
in an update, and annoyingly the contents are encrypted as well, stopping the user ID collection as well. This small file change broke the switcher for a short while, as it was difficult to find the culprit. Other account switchers may become unreliable as new files are used, and if they're not swapped it won't work 100% of the time.
Check the platform's Wiki (on this project's Wiki) to see what files it interacts with, and start by making sure those still exist (exact file names). Then, a good start is the above monitoring system: Check for file changes and see what files are edited while logging into an account. The more info you can find, the better. After doing so, create an issue.
After you have a solid list of what needs to be done to swap an account on X platform or have information on a platform that is not switching reliably or has updated, create a new issue HERE.
- Make sure to include a clear title like
Filesystem changes for Steam
, orNew platform request: GOG
. - Make sure to be clear in describing what needs to be added or changed. If you're fixing an issue, let me know what files are being used that aren't listed, renamed files etc. This is usually more difficult unless you have the expertise to look into the code and see how it works from the inside.
- Make sure to list files and registry entries you swapped to successfully swap accounts, and which are REQUIRED.
- If you dug a little deeper and found a username saved, or other identifiable data using something like Notepad++ or HxD, include it here.
- Include any other information you feel important to make swapping accounts on this platform possible.
Since version 5.0 (2022-01-30_00) adding platforms has become a LOT easier! You can simply edit a text file and add the info yourself. See the program's install directory for Platforms.json. If you have basic knowledge of JSON you should be able to add a platform very easily. Simply copy/paste an existing platform and edit the files and names to match your new platform. If you're looking for more advanced features or would like to learn things work, see the incredibly descriptive Templated platform guide
Once you add to Platforms.json
, please for this repo, apply your changes and submit a pull request. It's super simple to add platforms and merge in new ones with this new system, so please do take advantage! If you find ways to improve this Wiki, please do let me know, or make changes yourself.
Icons are a little more difficult. They must:
- Be placed in the icons directory with the same name as the platform's full name, in SVG format.
- Must consist of 1 path. No outlines are currently supported. Use the "Expand stroke" option to expand outlines that you work with into solid objects, then combine them all into one path.
- The single object must have
id="FG"
. - Remove the
fill="..."
and any other objects in the<path>
- Try and keep the
viewBox
to0 0 500 500
. In other words: Create a transparant image with500x500px
size. - Optional, but recommended: Run the file through a SVG minifier.
Why no outlines? Simply put: less effort. CSS only needs to define a color for a fill, making life SO much easier when it's applied evenly across multiple platform icons.
Finally, if you do go through with this much effort and information collection take a personal thank you from me, as this is something that takes time to complete and understand.
All trademarks and materials are the property of their respective owners and their licensors. This project is not affiliated with any companies referenced. This is not "Official" software or related to any companies mentioned. All it does is let you move your files around on your computer the same way you can. The use of names, icons and trademarks does not indicate endorsement of the trademark holder by this project or its creators, nor vice versa. They are only used to visually indicate which programs this project interacts with easily to the end-user.
By enabling optional features that scrape the web for publically available information (such as limited game/profile statistics and other data), you understand and accept full responsibility for doing so on your own volition. If you appreciate accurate information, support the services providing it directly. The information collected is incredibly limited and is no replacement or competitor for sites scraped.
I am not responsible for the contents of external links. For the rest of the disclaimer, refer to the License (GNU General Public License v3.0) file: https://github.com/TcNobo/TcNo-Acc-Switcher/blob/master/LICENSE - See sections like 15, 16 and 17, as well as GitHub's 'simplification' at the top of the above website.