ChrisTitusTech / winutil

Chris Titus Tech's Windows Utility - Install Programs, Tweaks, Fixes, and Updates
MIT License
24.44k stars 1.49k forks source link

When is a restart needed? #2644

Open billytwotone opened 2 months ago

billytwotone commented 2 months ago

I have watched CTT on YouTube do a restart to make changes made by Winutil take effect. There is no indications in the UI to indicate when a restart is needed. It would be handy to know which changes need a restart and which do not.

CTT tech welcomed uses to present issues in one of his YouTube videos. I hope that making the UI more intuitive will help the usability of Winutil.

Perhaps, the need for a restart could be announced in or near the progress bar when the changes have been made and the progress bar says finished.

billytwotone commented 2 months ago

To fan1chun. I do not understand what your reply is about. I really do not want to click on a link and download something that is unknown to me to find out what your reply is about, it if is a reply.

og-mrk commented 2 months ago

To fan1chun. I do not understand what your reply is about. I really do not want to click on a link and download something that is unknown to me to find out what your reply is about, it if is a reply.

Our apologies for this inconvenience. Apparently, there has been these spam messages from an account that could be made for scamming people or a hacked GitHub account, it has been reported already and GitHub Staff (over on support team) has taken the appropriate actions against these spam messages.

A good general advice is to never trust suspicious looking links or phishing links about "Get rich quick" or "Download this so you can do X thing", always be careful when clicking random links, and if you want to make sure a link is safe or a file is clean, you can follow the general steps of:

  1. Checking background of developers before download their software.
  2. Then, if the software is of interest to you, and you can trust the devs to a certain degree.. I recommend that you run the file or link in virustotal (or other well-known online virus scanning services), which'll test the provided link/file to a lot of different antivirus & malware sandbox.
  3. Last but not least.. see if the software is stable, don't just download some Alpha/Beta software and expect that everything will go well, it could very much (there's a risk) that said software can damage your system, so only run stuff that's safe and stable!

Now, back to the actual issue ticket, the problem is that WinUtil doesn't tell you if you ran a tweak(s) that might require a restart.

To solve this would require testing out each tweak/toggle button, and see if it requires a full system restart, a log off/log on, or a system notify through a sys call (through some C# code that uses Win32 API).. after doing so, we could add this valueable info to the JSON content, which'll be used at runtime, basically providing WinUtil with necessary info to tell the User "hay, you ran the following tweak(s) which require a restart, want to restart?" With 2 options to restart now or later.

This's going to take a bit of research and trial & error, so I'll mention some of WinUtil regualr contributors to see if they've feedback on this issue, plus any resources to share that might help when implementing this feature, Thanks for opening this issue @billytwotone , have a nice day 😄

@MyDrift-user , @Marterich , @CodingWonders

As this'll require some UI Logic alongside the underlying logic.. I'll see what I can do about it. For now, I'll link it to #2226 progress tracking issue.

MyDrift-user commented 2 months ago

For a long time I am planning to add the member "attribute" or smth like that to the json entrys, but never had enought content to add to make it valuable/make sense. For example needs explorer restart, only works with this version of windows ...

Implementing it into the UI I would add it to the empty space here if this PR gets accepted #2642 or a gui window, but nothing that could be hidden I would think about making it look something like winaero tweakers reboot information.

CodingWonders commented 2 months ago

@og-mrk, I agree with you on the suspicious links area. We already know these were infostealers and I had the same suspicion as you regarding those accounts.

Now, we could have an enum containing restart types: no restart, explorer.exe restart, log off, and full system restart.

To get when settings become effective, we'll need to do testing

og-mrk commented 2 months ago

@CodingWonders Also it should be of specific order, so if you run some tweaks, and one or more require a full system restart.. then other tweaks that've lower "tags" in this ordered enum to just be ignored or their requirement already resolved, meaning if I run tweak X, which requires a system restart, and tweak Y, which requires explorer.exe to restart.. then we should keep the system restart, as doing so (restarting your system) will meet the other tweak requirement, which's restarting explorer.

Also keeping this state from the start of WinUtil until it closes is important, using the order of priority mentioned previously, when user runs other tweaks (after applying tweaks earlier), and one or more require a log off.. and we already set the state to system restart.. then we should not override the state with a lower value, this can be done by first checking which one is higher in the list, then setting the state accordingly.

All of the above is implementation wise, and can be modified/improved upon.

As a side note, we could show a popup message (could be a custom WPF window) before closing WinUtil, which's based of the state (for example, no restart/action will not show the popup), and it might says "Would you like to do a system restart/log off to finish applying tweaks?" with some options to do so or ignore / do later manually.. even if some dislike pop-ups, it's a nice thing when you close a program and reminds you about something you should do before exiting, also this state of should restart and so on could be integrated into the automation system, where you can pass -RestartIfRequired to WinUtil, and it'll do so after running you config.json file.