Thanks a lot for the suggestion Rob
Unfortunately, there seem to be some issues with this approach. (I'm on a portable version of S+)
There is a StrokesPlus.net.bin
and a StrokesPlus.net.json
file in S+ directory. I only had .bin file but realized that S+ fresh copy gives .json file.
Correct me if I'm wrong but I think S+ first looks for .json
(to run from and save data into) and then .bin file. I'm not sure at what point my .json file got converted into .bin file(maybe after making it password protected?)
If it finds .json, it overrides
it, even if we ran S+ with .bin file(and later added a .json file to S+ directory)
So I decided to go with both .bin files
because the .bin(original encrypted) and .json(newly added dummy/default) combination would override the .json file and make it an encrypted one with the .bin file data whenever I turned PC off(.bin was loaded in S+ at that time)
But even after making two .bin files, .bin encrypted and .bin default(unencrypted) file, S+ would still override .bin default whenever I turned PC off.
Here is the sequence of steps:
- PC ON
- S+ loads (unencrypted .bin loads, encrypted .bin is present in directory renamed as .binSecure so it doesn't load)
- Shortcut is pressed which does the following:
- rename .bin to .binDefault
- rename .binSecure to .bin
- reload S+
- As a result the password prompt pops up, and encrypted .bin is usable.
- When its time to close PC, either from unload or from a custom shortcut, the following happens:
- save S+ config(saves to currently loaded .bin which is .binSecure)
- rename .bin to .binSecure
- rename .binDefault to .bin (so it can be loaded next time PC starts, it is unencrypted)
- But right after these last 2 steps, .binSecure is successfully renamed, and .binDefault is now .bin as intended BUT its size is that of .binSecure and so are its content(meaning it is now encrypted and acting as a copy of .binSecure)
I've tried inserting sleep pauses in between steps and tried a bunch of combinations but no luck, at one point a very interesting thing happened where
.bin (.binDefault) which normally has size of .binSecure after last 2 steps, actually had its original size and content but it was encrypted
with .binSecure password.
So in short, my brain is fried and I've realized something important which is..
even if it works as intended, S+ default would not be password protected
and anyone can examine it, it would require a shortcut
to open S+ encrypted and managing backups would get complex
as S+ versions change (since im only backing up encrypted .bin right now and would need to manage 2 at that time)
Therefore, since S+ is already pinned to the Start menu, why not press Win key and click on its icon
which is right there(I use full screen Start menu).
It would take almost the same time as waiting for S+ default to load and pressing shortcut to open S+ encrypted but its much more cleaner.
So that's what I'm doing for now, I've set S+ startup
status to disabled
and manually start S+ from Start menu when PC starts
Honestly a feature could be added to S+ dealing with profiles which are password protected and switchable but that feature is lacking even in browsers(where its much needed) so I wouldn't expect it in S+ so soon. But password protected encrypted profiles are useful for people who use the same copy of S+ for work and home.
Also a question about unload, I think unload executes when S+ is exited
, unlike load
which is executed when S+ starts
as well as every time S+ reloads
Does unload execute when we turn off PC while S+ is running? meaning does it execute all of its code and then lets the PC turn off? If there was a sp.Pause(10) in S+ unload, would PC turn off after 10 seconds?Thanks for reading the rant.