[PowerShell] Sophia Script for Windows 10 & Windows 11 | 5.17.8 | 6.5.8 | x64 2023

Discussion in 'Scripting' started by farag, May 8, 2020.

  1. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,308
    60
  2. playgameonl

    playgameonl MDL Novice

    Mar 10, 2019
    3
    0
    0
    Excuse me, is 4.5 version is really the latest of script for 1809 LTSC and 1903/1909?
    Because when I find the way to download on Github for those version is on
    https ://github. com /farag2/Windows-10-Sophia-Script/releases/tag/4.6

    Or it's just a mis-typo
    Thank you for this script, it helps us a lot
     
  3. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    Yes, the latest one. Have no time to rewrite it into module. Wait...
     
  4. playgameonl

    playgameonl MDL Novice

    Mar 10, 2019
    3
    0
    0
    Thank you.
    Are they the same? And why on github only LTSC version support confirmed but the 1903/1909 isn't?

    Sorry for my bad English.
     
  5. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
  6. zbigniew59

    zbigniew59 MDL Senior Member

    May 14, 2016
    374
    171
    10
    Sophia LTSC - Sophia.psd1 - lines - UnsupportedOSBuild = The script supports Windows 10 2004/20H1 versions and higher
    This is probably a bug? - this is for the LTSC
     
  7. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    #147 farag, Dec 30, 2020
    Last edited: Dec 30, 2020
    (OP)
    LOL yes )
    Fixed.
     
  8. DukiSync

    DukiSync MDL Junior Member

    May 12, 2010
    86
    31
    0
    I downloaded "Sofia Script" for Windows LTSC v5.0 and everything works perfectly! Thanks for the fantastic New Year's gift!

    Happy New Year!!!

    :clap::clap3::cheers::worthy:
     
  9. cra3y

    cra3y MDL Novice

    Oct 13, 2015
    5
    3
    0
    Hi Farag

    Please add these these code lines to "UninstallOneDrive" function:
    Code:
    New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS
    Remove-ItemProperty -Path "HKU:\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Run" -Name OneDriveSetup -Force -ErrorAction Ignore
    Remove-ItemProperty -Path "HKU:\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Run" -Name OneDriveSetup -Force -ErrorAction Ignore
    It will prevent to start OneDrive automatic setup for new users.
     
  10. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    Does it really need to be removed? Seems it applies to NT administrator only.
     
  11. cra3y

    cra3y MDL Novice

    Oct 13, 2015
    5
    3
    0
    #151 cra3y, Jan 2, 2021
    Last edited: Jan 2, 2021
    It depends, who are using Your script :) I always delete these reg entries in every new W10 deployment.

    If user want to use OneDrive, then he/she will download as their wish, but I hate MS for forcing OneDrive setup run in every new account then nag users to log in/create account.

    EDIT:
    I'm using workaround for some old OneDrive instances (when there is no UninstallString) by providing path to system-based OneDrive setup (which is always available):
    Code:
    try {
      [string]$UninstallString = Get-Package -Name "Microsoft OneDrive" -ProviderName Programs -ErrorAction Stop | ForEach-Object -Process {$_.Meta.Attributes["UninstallString"]}
    }
    catch {
       $UninstallString = """$env:SystemRoot\SysWOW64\OneDriveSetup.exe"" /uninstall"
    }
     
  12. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,308
    60
    #152 drew84, Jan 6, 2021
    Last edited: Jan 6, 2021
  13. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
  14. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,351
    2,308
    60
    You mean like this...:D:D:D
    Code:
    
    Title
    
        01. In Settings, add a switch to enable advanced (read: special) features.
            For example, "Advanced Features". There are no advanced features in the "Privacy" section
    
        02. The functions related to the extended ones will (when the latter are enabled) have a note in the frame that they belong to the special group "Extended"
    
        03. In the "Privacy" section, for the following functions, make 2 radio buttons with the following elements (the drop-down list is useful only when there are many elements):
    
            "Set the level of collection of OS diagnostic information." Elements: "Minimum" and "Default"
            "Change the frequency of generating reviews." Elements: "Never" and "Automatic"
    
    Example of radio buttons:
    
            https://raw.githubusercontent.com/felixse/FluentTerminal/master/Screenshots/settings.png
            https://github.com/felixse/FluentTerminal
    
        04. Function: "Disable Bing Search in Start Menu" only show if the region is USA
    
            (Get-ItemPropertyValue -Path "HKCU: \ Control Panel \ International \ Geo" -Name Nation) -eq 244
    
    C # (NetFramework 4.8):
    
            https://docs.microsoft.com/en-us/dotnet/api/system.globalization.regioninfo.geoid?view=netframework-4.8
            https://docs.microsoft.com/ru-ru/windows/win32/intl/table-of-geographical-locations (244)
    
        05. Display a list of tasks from the Task Scheduler as a list in my script: https://github.com/farag2/Windows-10-Sophia-Script/blob/4a18d0c07e810bfb9f73b8b5f694b5a9c423d6ee/Sophia/Sophia.psm1#L360
    
        06. Next to the "Select All" button write "Select All"
    
        07. Make the feature tiles evenly fill the canvas. To not be like in Tetris
    
        08. Raise the "Settings" button slightly up so that there is an indent from the bottom
    
        09. Specify the program version in the window title
    
        10. To the right of the toggle switch position, indicate in words its state: "On." or "Off" Example: https://raw.githubusercontent.com/felixse/FluentTerminal/master/Screenshots/settings.png
    
        11. Make a transition between sections as in https://github.com/felixse/FluentTerminal Video example (time-bound): https://youtu.be/7uepqoXRohQ?t=295
    
        12. Add the ability to copy a function description by clicking on the "Copy" frame context menu
    
        13. Function for exporting ico from a file. Will be needed in the future https://gist.github.com/darkfall/1656050#gistcomment-1332369
    
           #
           Add-Type -AssemblyName System.Drawing
           [System.Drawing.Icon] :: ExtractAssociatedIcon ("C: \ WINDOWS \ system32 \ control.exe"). ToBitmap (). Save ("C: \ Desktop \ 1 \ 1.ico")
    
           #
           $ Path = "$ env: SystemRoot \ system32 \ control.exe"
           $ FileName = "C: \ Desktop \ 1 \ 1.ico"
           $ Format = [System.Drawing.Imaging.ImageFormat] :: Icon
           Add-Type -AssemblyName System.Drawing
           $ Icon = [System.Drawing.Icon] :: ExtractAssociatedIcon ($ Path) | Add-Member -MemberType NoteProperty -Name FullName -Value $ Path -PassThru
           $ Icon.ToBitMap (). Save ($ FileName, $ Format)
    
        14. Shouldn't you use the toggle switch like in 10? ..
    
       ================================================== ================================================== ==========
    
           Window background blur effect - https://github.com/asm512/blurry-background-WPF/blob/master/src/BlurryWPFBackground/MainWindow.xaml.cs
    
           Custom scrollviewer - http://codesdirectory.blogspot.com/2013/01/wpf-scrollviewer-control-style.html
    
           LoadingRing - https://github.com/zeluisping/LoadingIndicators.WPF/blob/master/src/LoadingIndicators.WPF/Styles/LoadingRing.xaml
    
           Working with json: http://www.jsonutils.com/ https://jsonformatter.org/json-pretty-print
    
           Regular expressions: https://regex101.com/
    
           http://alexweinberger.com/main/pinning-network-program-taskbar-programmatically-windows-10/
    
       ================================================== ================================================== ==========
    
    
    GET BUILD NUMBER
    
       Get-ItemPropertyValue -Path "HKLM: \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion" -Name CurrentBuild
    
       How the error will look if there is no "Scripts" folder next to the executable file:
       https://app.zeplin.io/project/5ee37e184f5880b7453b9ea8/screen/5ee3a8c1560275b83f11a13a
       Instead of "Loading" you can write "There are no necessary files to run", and change the circle to rectangle
    
       https://help.steampowered.com/wizard/HelpWithPublishing?issueid=925
    
    
    GET DISPLAY NAMES OF UWP PACKAGES
    
       https://pastebin.com/raw/nDN7M1Hk https://stackoverflow.com/questions/23331385/how-to-obtain-the-display-name-of-installed-metro-apps/23376722#23376722
       https: // stackoverflow.com/questions/23331385/how-to-obtain-the-display-name-of-installed-metro-apps/37231613#37231613
       https://stackoverflow.com/questions/51480747/get-the-plain-end -user-readable-name-of-uwp-apps-installed-on-a-system / 51484211 # 51484211
    
    
     
  15. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    @drew84, you're god damn right!
     
  16. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    #156 farag, Jan 8, 2021
    Last edited: Jan 8, 2021
    (OP)
  17. ERRASoft

    ERRASoft MDL Novice

    Aug 17, 2014
    17
    3
    0
    can we make the Wrapper also miltilanguage?
    that would be great
     
  18. Nevals

    Nevals MDL Novice

    Jan 9, 2021
    10
    1
    0
    Hello, after I run this script my computer does not go to sleep in balanced power plan mode.

    Something is definitely changed after this script but I do not know what I need to disable in script do have sleep mode working.

    Can you help me please

    Thank you
     
  19. farag

    farag MDL Member

    Apr 1, 2014
    238
    352
    10
    I do not touch a power scheme in the balanced mode. So I do not think it's a script fault.
    I only let user enable/disable high perfomance plan.
    May be I can help you via TeamViewer or similar app.
     
  20. Nevals

    Nevals MDL Novice

    Jan 9, 2021
    10
    1
    0
    #160 Nevals, Jan 9, 2021
    Last edited: Jan 9, 2021
    This is before Sophia:
    https://prnt.sc/wjqvp4
    [​IMG]

    This is after Sophia:
    https://prnt.sc/wjqwt8
    [​IMG]

    You can see there is less options after Sophia. There must be something associated with Sophia