Results 1 to 10 of 935

Thread: Windows 10 and Office Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    This is post #499 https://excelfox.com/forum/showthrea...ge50#post12774
    https://excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page50#post12774





    So at about the start of February, I was thinking of starting my own Tool from scratch, looking something like the pics from the last post. But I went off to learn PowerShell script a bit better, and do a few other things until about mid March.
    Chris updated a few times during this period, so this post is a History to keep me in touch. I may not add the things or changes Chris made. But I may adjusts my lines to , for example add spaces where he inserted stuff. This is so I can still relate my script to his in the future..**

    Friday, 11 Feb., 2022 Update
    On the Friday, 11 Feb., 2022, Chris did his Live stream on the Tool, … 9.30 Live - Toolbox Update - New Features (Disable_Enable Updates)-WRg5nItpghA_11 02 2022
    https://www.youtube.com/watch?v=WRg5nItpghA
    https://drive.google.com/file/d/1kNQ...?usp=drive_web
    https://drive.google.com/file/d/1khe...?usp=drive_web


    I have taken my last temporary file up to Temp 4, Temp4.ps1 , to take account of this. But I am not adding the changes, but rather just adding spaces so that my code lines are approximately the same.**
    Notes on these spaces and the generally current code stand follow
    At the same the time, the following notes give a general review of the code from Chris, now a bit further on, before I write the whole thing from scratch. Basically the 11 Feb Live video came out while I was about to start my new from scratch script
    So I am combining a general review of the current stand of Chris’s code, win10debloatChris12Feb2022.ps1
    Share ‘win10debloatChris12Feb2022.ps1’ https://app.box.com/s/5lfgt22pqtly1g127ubnybj6ltn3j1x3

    , with my latest, Temp4.ps1
    Share ‘Temp4.ps1’ https://app.box.com/s/y291ha4eb906v7lkvd8ehzz9ii70cvoh


    Chris playing with his PoshGUI( 53:30 … don’t hate me for it! https://www.youtube.com/watch?v=WRg5nItpghA&t=3210s )
    Chris was playing with his PoshGUI again.
    Looking at what he does… I think as you put buttons on an existing thing that it will make the variable with the name you give it ( by default it will give you button1 , botton2, button6 etc.. as available, - as you re name it, then that default name, button1 , for example is available to poshGUI to use). I expects poshGUI will then automatically add that bloated button layout bit, and add appropriately the reference in the adding variable in the pane code lines.
    The $kkjash.Add_Click bit you do yourself, ( before or after ) but if you do it after, some intellisense offers the .Add_Click for it, amongst other things, when you write in the variable $kkjash.somewhere.
    The stuff you put in the $kkjash.Add_Click is the real meaty stuff that does anything. If Chris was doing this for himself, in his day job, he would just have all that meaty stuff and run that as he wanted



    So, This is a generally summary of mine since/ just after Chris’s, and the Live video
    Up to about 30 is some crap bloat, and the winget bit, then the Form is finished
    at about 40 and then we are mostly into the large repeated GUI produced button bloat
    To allow for 4 new buttons and a warning label made by Chris in that video, I make a big space from approx 620 – 650 , which pushes the small number ( 5-7 ) of Form Pane lines up to approximately 660


    So these 4 bloat button bits and a label is what posh GUI did
    $NFS
    $laptopnumlock #( ------ *** )
    $disableupdates
    $enableupdates
    $Label12

    That got added to the large form button repeated bloat section taking us to approx 860

    Me or Chris has got a line or two out of step, but we are approximately together, 866-867 Essential Tweaks starts, ……….._
    _........
    _.... ( with service tweaks starting at about 1056-1058 )
    As far as I can see, that Edge Bing start up tweak, ( https://github.com/nikilson/win10scr...e09a7125868e92 )
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Se arch" -Name "BingSearchEnabled" -Type DWord -Value 0 ; Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Se arch" -Name "AllowSearchToUseLocation" -Type DWord -Value 0
    , is still missing, ( Chris , I think, meant to put it just after end of services/essential tweaks … ( https://excelfox.com/forum/showthrea...ge50#post12767 ) )
    I have Essential Tweaks split up a bit. But we are finishing approximately together at 1156-1157

    We both have a dualboottime Add_Click and then I have made a space for a laptopnumlock which came in from Chris on the 11th Feb. He seemed to think it should have been there and he had forgotten it. ( *** Chris actually then duplicated a Add_Click which was already there- so he had just missed the button previously. )
    So we both start the essential undo at 1173. At this stage I have not split or changed any essential undo so we finish that at 1286.
    1288 – 1371 We then have a very large $windowssearch Add_Click which does not seem to have a button?? ( It has a short #commented out Cortana disable section )

    A short $backgroundapps Add_Click then
    1383 _
    __– 1404 A fairly large disable Cortana

    1406- 1496 The Bloatware array
    1497 – 1522 Button pair: removes and re ad bloat ( MS Store Apps )

    1524 – 1563 Button pair: default updates or the security only

    Up to about 1895 is mostly all other buttons used on script until the 11 Feb redesign, (*** and I note a strange $DisableNumLock Add_Click is a duplicate of the added on Feb 11 $laptopnumlock [ Laptop Numlock Fix ] ***

    Chris also slipped in the $NFS .Add_Click at 1790, so I have a space from 1790 to 1802

    1897 – end ( 2069 ) button pairs which were main theme from 11 Feb. $disableupdates .Add_Click $enableupdates .Add_Click
    So for mine I have a big space from 1897 – 2069


    Summary
    There is a very short GUI bit at the start that Chris never seems to go near anymore . This makes a meal of the very simple few lines that make a form, and fucks it up.

    The rest is all ( except for the meat behind the buttons, ( the $hfvafh Add-Click stuff ) bit ) all dome by PoshGui in a terribly jumbled up way.
    It’s so jumbled and messed up, that Chris often screws up putting the meaty bits in.






    win10debloatChris12Feb2022.ps1 https://app.box.com/s/5lfgt22pqtly1g127ubnybj6ltn3j1x3
    Temp4.ps1 ’ https://app.box.com/s/y291ha4eb906v7lkvd8ehzz9ii70cvoh









    Here is a few minor issues, which I might try to get across to him
    Num Lock chaos issue https://www.youtube.com/watch?v=WRg5...P1d2B994AaABAg https://www.youtube.com/watch?v=WRg5nItpghA&t=2210s
    At minute 36:50 he noticed by chance when doing something else, that some time previously he had missed a Disable NumLock after startup button and coding, so he made one , $laptopnumlock
    ( https://www.youtube.com/watch?v=WRg5nItpghA&t=2210s )
    629 $laptopnumlock = New-Object system.Windows.Forms.Button
    630 $laptopnumlock.text = "Laptop Numlock Fix"
    631 $laptopnumlock.width = 211
    632 $laptopnumlock.height = 30
    633 $laptopnumlock.location = New-Object System.Drawing.Point(4,267)
    643 $laptopnumlock.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',12)


    1164 $laptopnumlock.Add_Click({
    1165 Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 0
    1166 Add-Type -AssemblyName System.Windows.Forms
    1167 If (([System.Windows.Forms.Control]::IsKeyLocked('NumLock'))) {
    1168 $wsh = New-Object -ComObject WScript.Shell
    1169 $wsh.SendKeys('{NUMLOCK}')
    1170 }
    1171 })


    In fact he had only forgotten the GUI button, the Add Click coding was there
    1751 $DisableNumLock.Add_Click({
    1752 Write-Host "Disable NumLock after startup..."
    1753 Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 0
    1754 Add-Type -AssemblyName System.Windows.Forms
    1755 If (([System.Windows.Forms.Control]::IsKeyLocked('NumLock'))) {
    1756 $wsh = New-Object -ComObject WScript.Shell
    1757 $wsh.SendKeys('{NUMLOCK}')
    1758 }
    1759 $ResultText.text = "`r`n" +"`r`n" + "NUMLOCK Disabled"
    1760 })


    He is still screwing up the GUI size, I did a few comments again at YouTube. Most got deleted, as did late a lot of very helpful posts I did at GitHub




    Commit 17 Feb 2022
    Chris added some Virtual thing that I don’t understand yet. He did a video on 19 Feb.
    Apparently it is already there in Windows Pro, so he has a button in his troubleshoot section. So I guess the script he added behind the button does some of what you would do get the thing up and running.
    So I will do a simple Temp4.ps1 to Temp5.ps1 , making spaces so that Temp5.ps1 has the same line positioning of most stuff as this
    win10debloatChris17Feb2022.ps1
    https://app.box.com/s/fajb84rq6x2dz9vl0a6dhgbj8l5t8xku

    So we need to shift down some lines in mine from 657 for the button to the form:
    https://i.postimg.cc/Y23rjBBP/Shift-down-from-657.jpg
    and
    similarly for the coding behind the button, my Temp5.ps1 has the start line for the code behind update fix button, $windowsupdatefix.Add_Click({ , shifted down to 1826
    https://i.postimg.cc/VLkYCZYk/update...wn-to-1826.jpg

    That appears to be all I need to do, but while I am here……

    I seem to have not made the end space at the end for the 11 Feb enable and disable update meat behind the button stuff? - I am not sure if that was intentional, or whether that got truncated accidentally somehow.
    So going backwards up the script, I put some comment lines in to keep it in wach.
    https://i.postimg.cc/6p6YwRLS/adding...dded-by-me.jpg
    https://i.postimg.cc/P5Fzj7qp/adding...dded-by-me.jpg
    https://i.postimg.cc/zGMWMRdT/adding...dded-by-me.jpg

    In fact as a very last action for Temp5.ps1, I added some similar comment lines to help me orientate in the future to things added by Chris but not yet added by me.
    https://i.postimg.cc/YSzrF5mj/adding...dded-by-me.jpg
    https://i.postimg.cc/4yhj6cFw/adding...-yet-added.jpg
    https://i.postimg.cc/j51GncvL/adding...-yet-added.jpg
    https://i.postimg.cc/0NVgPPwG/adding...t-added-by.jpg
    https://i.postimg.cc/Y905SZ65/adding...added-by-m.jpg
    https://i.postimg.cc/6TJgYQkK/Chriss...king-lines.jpg
    https://i.postimg.cc/7YSZDJYg/Consol...everywhere.jpg
    https://i.postimg.cc/K8FvYcRC/Consol...everywhere.jpg
    https://i.postimg.cc/QN2dRJs8/Consol...everywhere.jpg


    ( Just one last thing. I #commented out the default winget install at this Temp5.ps1 stage, just because I want to do some testing later on virgin machines which involves investigating if this is done. I don’t want to do that currently )
    https://i.postimg.cc/9X7Wtw9v/Tempor...-temp5-ps1.jpg





    Temp5.ps1 https://app.box.com/s/vp8sdqoducp6rn1yj4dsb7edinasdjlf
    win10debloatChris17Feb2022.ps1 https://app.box.com/s/fajb84rq6x2dz9vl0a6dhgbj8l5t8xku



    Last edited by DocAElstein; 04-01-2022 at 10:52 PM.

Similar Threads

  1. Tests and Notes on Range Referrencing
    By DocAElstein in forum Test Area
    Replies: 70
    Last Post: 02-20-2024, 01:54 AM
  2. Tests and Notes for EMail Threads
    By DocAElstein in forum Test Area
    Replies: 29
    Last Post: 11-15-2022, 04:39 PM
  3. Notes tests. Excel VBA Folder File Search
    By DocAElstein in forum Test Area
    Replies: 39
    Last Post: 03-20-2018, 04:09 PM
  4. Replies: 2
    Last Post: 12-04-2012, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •