When running a scheduled task PowerShell script, it prompts that there is no permission problem

Discussion in 'Windows 11' started by olivetree24516, Jun 15, 2025.

  1. olivetree24516

    olivetree24516 MDL Novice

    May 16, 2024
    18
    2
    0
  2. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    7,211
    8,766
    240
    Not an expert, but you might need TrustedInstaller privileges.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. 12 lb Turkey

    12 lb Turkey MDL Member

    Nov 24, 2022
    133
    82
    10
    User Choice Protection Driver (UCPD) may be blocking the change at the kernel level.

    You can try adding these PowerShell commands under "Run custom scripts" / SYSTEM:
    Code:
    Set-Service -Name UCPD -StartupType Disabled; Disable-ScheduledTask -TaskName "\Microsoft\Windows\AppxDeploymentClient\UCPD velocity"
    
    This will disable UCPD, and allow you to make more HKCU changes related to taskbar which are protected by the kernel driver.
     
  4. migascalp

    migascalp MDL Addicted

    Sep 18, 2009
    517
    884
    30
    Code:
    Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d "0" /f
    Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "SearchOnTaskbarMode" /t REG_DWORD /d "0" /f
    
    These keys work at the specialized stage.
    Tested on Core 26100.4061.
     
  5. sonic9

    sonic9 MDL Member

    Aug 4, 2009
    198
    81
    10
    #5 sonic9, Jun 15, 2025
    Last edited: Jun 15, 2025
  6. olivetree24516

    olivetree24516 MDL Novice

    May 16, 2024
    18
    2
    0
    Thanks for the reply, following your pointers, I changed the unattended configuration and now the search box is finally hidden.
     
  7. olivetree24516

    olivetree24516 MDL Novice

    May 16, 2024
    18
    2
    0