45 private links
Fair enough. You can do what I did to disable the task (it may be a different UpdateOrchestrator task - I just didn't want my laptop rebooting when it felt like it so I disabled the Reboot task), then:
Open an elevated Command Prompt
Run SCHTASKS /Change /TN "Microsoft\Windows\UpdateOrchestrator\Reboot" /DISABLE to disable the Reboot task (assuming it's the Reboot task you want to disable)
Grab NSudo (I won't link to the site I got that from because of this sub's rules, but its source is here: github.com/MouriNaruto/NSudo)
Run NSudo - set it to open cmd and have it use the TrustedInstaller user.
Run icacls "%WINDIR%\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot" /inheritance:r /deny "Everyone:F" /deny "SYSTEM:F" /deny "Local Service:F" /deny "Administrators:F" inside the new CMD window. This will prevent the task from being enabled again. This assumes you're running an English version of Windows - translate the user names as necessary or find the SIDs, if required.
I've had two cumulative updates now and the task remains disabled.
USE tempdb
GO
IF OBJECT_ID('t') IS NOT NULL DROP TABLE t
IF OBJECT_ID('t_uq') IS NOT NULL DROP FUNCTION t_uq
GO
CREATE TABLE t(c0 INT, c1 NVARCHAR(50), c2 bit)
GO
CREATE FUNCTION t_uq(@c1 NVARCHAR(50))
RETURNS bit
AS
BEGIN
DECLARE @ret bit
IF (SELECT COUNT(*) FROM t WHERE c1 = @c1 AND c2 = 1) > 1
SET @ret = 0
ELSE
SET @ret = 1
RETURN @ret
END
GO
ALTER TABLE t ADD CONSTRAINT t_c CHECK(dbo.t_uq(c1) = 1)
INSERT INTO t(c0, c1, c2) VALUES(1, 'a', 0) --OK
INSERT INTO t(c0, c1, c2) VALUES(2, 'a', 0) --OK
INSERT INTO t(c0, c1, c2) VALUES(3, 'b', 1) --OK
INSERT INTO t(c0, c1, c2) VALUES(4, 'b', 1) --Fails
--So far so good, but watch now:
UPDATE t SET c2 = 1 WHERE c0 = 2
--No error, the constraint doesn't do its job!
--We have invalid data:
SELECT * FROM t
put*** génial :
(remarque : vous pouvez copier/coller les commandes)
- Cliquez sur Démarrer, tapez cmd sur la barre de recherche, faites un clique droit sur cmd.exe
- Choisissez exécutez en tant qu'administrateur.
- Tapez net stop wuauserv et validez par la touche Entrée, cette commande permet d'arrêter le service Windows Update.
- Tapez ren %windir%\SoftwareDistribution SoftwareDistribution.Old et validez par la touche Entrée, cette commande permet de renommer le ficher « softwaredistribution ».
- Tapez net Start wuauserv et validez par la touche Entrée, cette commande permet de démarrer le service Windows Update
- Après cette manipulation vous pouvez relancer la recherche des mises à jour et l'installation.