Windows 10 Tweaks & Fixes

Discussion in 'Windows 10' started by Zardoc, Jul 17, 2015.

  1. adric

    adric MDL Expert

    Jul 30, 2009
    1,398
    1,519
    60
    I did this with Pro and I see the red line 'Some settings are managed by your organization' after setting the policy, but windows still downloaded kb3074667 and installed it today. Did you get a notification?
     
  2. Zardoc

    Zardoc MDL Addicted

    Feb 7, 2008
    590
    276
    30
    #242 Zardoc, Jul 21, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    OKAY, maybe someone can give me a crash course in PowerShell.

    So suppose I had a couple of reg tweaks that keep getting bumped with security updates like these:

    Code:
    Windows Registry Editor Version 5.00
    ; Documents
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}]
    ; Music
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}]
    ; Downloads
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}]
    ; Pictures
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}]
    ; Videos
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}]
    ; Desktop
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}]
    
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}]  
    
    How would I write my PowerShell to as you say re-run itself under the System account every 30 minutes or so?
    If you don't mind explaining the code so I can catch on (or just post it if you don't want to)

    Thanks for the help. :tasty:
     
  3. Zardoc

    Zardoc MDL Addicted

    Feb 7, 2008
    590
    276
    30
    I tried that with Pro and no go. :tasty:
     
  4. Shayne

    Shayne MDL Addicted

    Jul 31, 2009
    752
    181
    30
    #244 Shayne, Jul 21, 2015
    Last edited: Jul 21, 2015
    So it does not work? To bad I think I will give it a go anyway to see. This force feed upgrade is a borderline infringement of ones freedom to choose. Push it down your throat will eventually become to just hack the damn thing off. If that is the added security M$ was looking for .............. we update nothing ever since they have given us no choice, so be it. I have come to grips with the spying and can say who cares as I am not that interesting however this update force feed is a different story, will not be installing this OS on a real machine for awhile by the looks of it.

    Has anyone see this in the wild? Windows 10 Enterprise 2015 LTSB

    Regards

    Edit: It def no longer displays that updates will be download n installed auto as Murphy78 suggested it took a reboot and a bit of time. Now we see if it stops updating. So now there is no way to look at what updates are there and pick and choose what and when we update?
     
  5. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,769
    1,106
    60
  6. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,733
    120
    No one is forcing you to use a Microsoft OS. If you don't like it don't use it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Shayne

    Shayne MDL Addicted

    Jul 31, 2009
    752
    181
    30
    "In rare cases, a specific driver or update might temporarily cause issues with your device, and in this case you will need a way to prevent the problematic driver or update from reinstalling automatically the next time Windows Updates are installed."

    Ah .... you think, if it is working ok why would I want M$ have the control to rarely do anything?

    This is such a stupid direction it is funny. :D

    Regards
     
  8. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,733
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Shayne

    Shayne MDL Addicted

    Jul 31, 2009
    752
    181
    30
    Good response, I don't need to use it and have no need to express a opinion, got it. This is the typical if you do not like something why bother to change it, the world was created with wisdom such as that.

    Regards
     
  10. Shayne

    Shayne MDL Addicted

    Jul 31, 2009
    752
    181
    30
    I do not believe that anyone said we do not want updates, what has been said we is want control of our own PERSONNAL COMPUTER.

    Regards
     
  11. Shenj

    Shenj MDL Expert

    Aug 12, 2010
    1,554
    654
    60
    #253 Shenj, Jul 21, 2015
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Belarathon

    Belarathon MDL Senior Member

    Nov 21, 2007
    316
    37
    10
    #254 Belarathon, Jul 21, 2015
    Last edited by a moderator: Apr 20, 2017
    I've been having an issue with .jpg file association when called from a third-party program. For example, I use newsleecher. When I want to preview a propective image, I just click "open" within the program. Windows prompts for a file association, but the association won't "take". It will keep prompting. I've also tried to make the association to Windows own image viewer, but the association won't stick in that instance either. This fixes the issue:


    Code:
    Windows Registry Editor Version 5.00 
    
    [HKEY_CLASSES_ROOT\.jpe] 
    "PerceivedType"="image" 
    @="jpegfile" 
    "Content Type"="image/jpeg" 
    
    [HKEY_CLASSES_ROOT\.jpe\OpenWithProgids] 
    "jpegfile"=hex(0): 
    
    [HKEY_CLASSES_ROOT\.jpe\PersistentHandler] 
    @="{098f2470-bae0-11cd-b579-08002b30bfeb}" 
    
    [HKEY_CLASSES_ROOT\.jpeg] 
    "PerceivedType"="image" 
    @="jpegfile" 
    "Content Type"="image/jpeg" 
    
    [HKEY_CLASSES_ROOT\.jpeg\jpegfile] 
    
    [HKEY_CLASSES_ROOT\.jpeg\jpegfile\ShellNew] 
    
    [HKEY_CLASSES_ROOT\.jpeg\OpenWithProgids] 
    "jpegfile"=hex(0): 
    
    [HKEY_CLASSES_ROOT\.jpeg\PersistentHandler] 
    @="{098f2470-bae0-11cd-b579-08002b30bfeb}" 
    
    [HKEY_CLASSES_ROOT\.jpg] 
    "PerceivedType"="image" 
    @="jpegfile" 
    "Content Type"="image/jpeg" 
    
    [HKEY_CLASSES_ROOT\.jpg\jpegfile] 
    
    [HKEY_CLASSES_ROOT\.jpg\jpegfile\ShellNew] 
    
    [HKEY_CLASSES_ROOT\.jpg\OpenWithProgids] 
    "jpegfile"=hex(0):
     
  13. Zardoc

    Zardoc MDL Addicted

    Feb 7, 2008
    590
    276
    30
    #255 Zardoc, Jul 21, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Well, don't know what I'm doing wrong saved script as .ps1, ran it and nothing :weep:

    Code:
    Configuration Remove_Libraries {
    
    Node localhost
    
    {
    
    Script 95bc0f1f-4064-4156-bb43-1fe42a48c409
    {
    SetScript = {
    
    ####################
    # SAFE TO EDIT BELOW
    ####################
    
    # W10x64
    # Documents
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" -Recurse
    # Music
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" -Recurse
    # Downloads
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" -Recurse
    # Pictures
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" -Recurse
    # Videos
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" -Recurse
    # Desktop
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" -Recurse
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" -Recurse
    # Second Control Panel Icon
    Remove-Item -path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" -Recurse
    
    ####################
    # SAFE TO EDIT ABOVE
    ####################
    
    
    }
    }
    
    TestScript = {Return $false}
    
    GetScript = {
    Return @{
    GetScript = $GetScript
    SetScript = $SetScript
    TestScript = $TestScript
    Result = "Script will run under System Account"}
    }
    }
    
    
    
    
    }
    }
    
    cls
    If (-Not(Test-Path C:\Temp)){New-Item C:\Temp}
    cd c:\temp
    Remove_Libraries
    Start-DscConfiguration -Wait -Verbose -Path .\Remove_Libraries
     
  14. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,398
    340
    #256 s1ave77, Jul 21, 2015
    Last edited by a moderator: Apr 20, 2017
    Any error output? Set Execution policy to unrestricted? Tried to run as .\anyname.ps1?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,769
    1,106
    60
    #257 Mr Jinje, Jul 21, 2015
    Last edited: Jul 21, 2015
    Try it from Powershell ISE in Run As Administrator mode. The check your C:\Temp file for any Remove_Libraries related stuff.

    Useful commands.

    Get-DscConfiguration

    Test-DscConfiguration
     
  16. Zardoc

    Zardoc MDL Addicted

    Feb 7, 2008
    590
    276
    30
    Well there seems to be an error with command. :tasty:

    At line:60 char:1
    + }
    + ~
    Unexpected token '}' in expression or statement.
    + CategoryInfo : ParserError: :)) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

    PS C:\WINDOWS\system32> Test-DscConfiguration
    The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on
    the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    + CategoryInfo : ConnectionError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x80338012
    + PSComputerName : localhost

    PS C:\WINDOWS\system32> Get-DscConfiguration
    Get-DscConfiguration : The configuration does not exist. Exécutez la commande Start-DscConfiguration avec le paramètre -Path pour commencer par spécifier un fichier de configuration et créer une configuration actuelle.
    At line:1 char:1
    + Get-DscConfiguration
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration
     
  17. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,769
    1,106
    60
    My bad, remove the last bracket above the cls command.

    }

    cls
     
  18. Zardoc

    Zardoc MDL Addicted

    Feb 7, 2008
    590
    276
    30
    cd : Cannot find path 'c:\temp' because it does not exist.
    At line:63 char:1
    + cd c:\temp
    + ~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (c:\temp:String) [Set-Location], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

    PsDesiredStateConfiguration\Script : Class 'Script' requires that a value of type 'String' be provided for property 'GetScript'.
    At line:7 char:1
    + Script 95bc0f1f-4064-4156-bb43-1fe42a48c409
    + ~~~~~~
    + CategoryInfo : InvalidOperation: :)) [Write-Error], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingValueForMandatoryProperty,PsDesiredStateConfiguration\Script

    PsDesiredStateConfiguration\Script : Class 'Script' requires that a value of type 'String' be provided for property 'TestScript'.
    At line:7 char:1
    + Script 95bc0f1f-4064-4156-bb43-1fe42a48c409
    + ~~~~~~
    + CategoryInfo : InvalidOperation: :)) [Write-Error], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingValueForMandatoryProperty,PsDesiredStateConfiguration\Script

    PSDesiredStateConfiguration\Node : The term 'TestScript' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.
    At line:3 char:1
    + Node localhost
    + ~~~~
    + CategoryInfo : ObjectNotFound: (TestScript:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException,PSDesiredStateConfiguration\node

    WARNING: The configuration 'Remove_Libraries' is loading one or more built-in resources without explicitly importing associated modules. Add Import-DscResource –ModuleName ’PSDesiredStateConfiguration’ to your configuration to av
    oid this message.
    Errors occurred while processing configuration 'Remove_Libraries'.
    At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3588 char:5
    + throw $ErrorRecord
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (Remove_Libraries:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration