farag2 / Sophia-Script-for-Windows

:zap: The most powerful PowerShell module for fine-tuning Windows
MIT License
7.8k stars 579 forks source link

Sophia Script detecting the use of other scripts even after using a restore point. #562

Closed yuzamei2854 closed 8 months ago

yuzamei2854 commented 8 months ago

Prerequisites

Steps to reproduce

After installing Windows 10 LTSC with its updates and some drivers, I created a restore point and decided to install some programs and use another script, after a while I wanted to test Sophia Script to see how it compares, so I decided to open the restore point and go to the point I had created before running anything, but when I tried to run Sophia Script along with Wrapper, it shows me an error that I had already run a script before and that I should reinstall Windows.

I decided to open the Windows configuration and see if the options were set back to default before I ran the other script, and yes, they were set back to default, I have no idea what Sophia Script is complaining about, it would be very annoying for me to have to reinstall Windows over and over again when I could have just loaded the last restore point before running anything.

Windows Version

Windows 10 21H2 19044.4170 (IoT Enterprise LTSC)

Sophia Script version

6.6.2 - 06.03.2024

farag2 commented 8 months ago

Could you upload a screenshot?

yuzamei2854 commented 8 months ago

Could you upload a screenshot?

Sure.

floorp_u0bMqEv8Em

farag2 commented 8 months ago

Did you run Winutil script before?

Clear %TEMP% folder and try again.

yuzamei2854 commented 8 months ago

Yes.

Cleaning out the %TEMP% folder fixed it, thanks.

It seems that the Windows restore point saves some files, such as the other script's .log, in the %TEMP% folder.

So Sophia Script is looking for .log files of other scripts? that should be fine for most cases, but for cases like this where the settings were as default and what triggered it was just a saved .log file, wouldn't it be better to have another way of detecting when a script has actually been executed on the system?

farag2 commented 8 months ago

You mustn't run any harmful tweakers regardless the method Sophia uses. :)