|
|
本帖最后由 chairmansu 于 2026-8-7 12:06 编辑
- Set-ItemProperty -Path 'Registry::HKCU\Control Panel\NotifyIconSettings\*' `
- -Name 'IsPromoted' `
- -Value 1 `
- -Type DWord
复制代码
以上存成*.ps1 用powershell執行
或是複製下來用powershell貼上執行即可
Value 1 改成 0 即可復原
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
方法二
以下存檔為*.xml匯入任務計劃程序
1分鐘會檢測一次
- <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
- <Triggers>
- <LogonTrigger>
- <Repetition>
- <Interval>PT1M</Interval>
- <StopAtDurationEnd>false</StopAtDurationEnd>
- </Repetition>
- <Enabled>true</Enabled>
- </LogonTrigger>
- </Triggers>
- <Principals>
- <Principal id="Author">
- <GroupId>S-1-5-32-545</GroupId>
- <RunLevel>LeastPrivilege</RunLevel>
- </Principal>
- </Principals>
- <Settings>
- <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
- <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
- <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
- <AllowHardTerminate>true</AllowHardTerminate>
- <StartWhenAvailable>false</StartWhenAvailable>
- <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
- <IdleSettings>
- <StopOnIdleEnd>true</StopOnIdleEnd>
- <RestartOnIdle>false</RestartOnIdle>
- </IdleSettings>
- <AllowStartOnDemand>true</AllowStartOnDemand>
- <Enabled>true</Enabled>
- <Hidden>false</Hidden>
- <RunOnlyIfIdle>false</RunOnlyIfIdle>
- <WakeToRun>false</WakeToRun>
- <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
- <Priority>7</Priority>
- </Settings>
- <Actions Context="Author">
- <Exec>
- <Command>%windir%\System32\conhost.exe</Command>
- <Arguments>--headless %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -NoProfile -NonInteractive -Command "Set-ItemProperty -Path 'Registry::HKCU\Control Panel\NotifyIconSettings\*' -Name 'IsPromoted' -Value 1 -Type 'DWord';"</Arguments>
- </Exec>
- </Actions>
- </Task>
复制代码 |
|