Windows 7 — Service Trigger. Триггеры для служб.
В этой статье поговорим о службах, запускаемых по триггеру (trigger start service), новой функции, впервые появившейся в Windows 7. В принципе, службы, запускаемые по триггеру в Windows 7 – это обычные службы, которые можно настроить на остановку или запуск по наступлению какого-либо событий (это может быть открытие порта, доступность ip адреса и т.д.). Перечислим доступные триггеры, которые могут быть использованы для настройки запуска служб в Windows 7 Service Trigger:
- Открытие/закрытие порта на брандмауэре
- Подключение/отключение устройства
- Вход или выход из домена
- Доступность/недоступность определенного ip адреса
- Изменение в групповых политиках
- Настраиваемое событие – с помощью программного интерфейса windows ETW
Зачем вообще понадобился механизм служб, запускаемых по триггеру в Windows 7/2008 r2? Службы, запускаемые по триггеру нужны для:
1) Увеличения быстродействия системы и оптимизации использования системных ресурсов. Ведь любая запущенная служба (даже если она работает в фоновом режиме) потребляем ресурсы CPU и памяти, так зачем же тратить драгоценные ресурсы для служб, которые в данный момент не нужны?
2) Экономия электроэнергии. Как и в первом пункте речь идет об уменьшении загрузки на CPU, и как следствие уменьшения потребления электроэнергии (что особенно актуально для переносных устройств: ноутбуков, нетбуков, планшетов)
3) Увеличение стабильности работы системы за счет уменьшения количества постоянно запущенных процессов (имеется в виду вероятные утеки памяти в службах)
Познакомимся с технологию Service Trigger в Windows 7 поближе. В качестве примера возьмем службу «Computer Browser» (Обозреватель сети), которая по умолчанию настроена на ручной (manual) запуск, однако, как мы видим на скриншоте, в настоящий момент она запущена.
Откроем командную строку и наберем в ней следующую команду:
После выполнения этой команды можно увидеть, что для службы Computer Browser настроен сервисный триггер. Служба Computer Browser запустится только после того, как откроется следующие порты в брандмауэре (139 TCP, 137 UDP, 138 UDP), и отключится, как только указанные порты будут закрыты.
Данную статью я пишу на своем ноутбуке, подключенном к интернету с помощью Wireless LAN, поэтому, если я отключу свое беспроводное соединение, должен перестать проходить любой сетевой трафик через брандмауэр, и служба Computer Browser должна отключиться автоматически. И действительно, через 60 секунд после того, как я отключил Wireless LAN, служба «Обозревателя сети» отключилась.
Затем я вновь активировал мое беспроводное подключение, и в результате срабатывания триггера службы Computer Browser, она вновь запустилась.
Попробуем посмотреть информацию о триггерах другой сетевой службы, DHCP:
Как вы видите, для данной службы нет ни одного заданного триггера.
The Core Technologies Blog
Our Software // Windows Services // 24×7 Operation
Q&A: What do “Automatic (Trigger Start)” and “Manual (Trigger Start)” mean for Windows Services?
Hi Liam. Those trigger start types are indeed mysterious. And the Services application makes no attempt to explain what they are.
For example, even though the phrase “Trigger Start” appears in the “Startup type” column in the list of services, that designation is absent when you dig into an individual service.
Here we see the User Manager service showing a startup type of “Automatic (Trigger Start)” in the list but simply “Automatic” in the same field in the service’s properties window:
Baffling, to say the least.
Let’s break down each of the start type names into their two components, to understand what the Services application is trying to communicate.
What do “Automatic” and “Manual” mean?
The first component tells Windows what to do with the service when the computer boots.
Automatic says “start this service when the computer boots”.
Manual means “don’t start the service at boot; it may be started at some other time”.
There are other startup types too but those will be explained in a future article.
What does the “Trigger Start” part mean?
While the first component focuses on what happens at boot, the “Trigger Start” wording indicates if the service can be started or stopped by various operating system events.
For example, some services are configured to start when a USB drive is inserted. Other services may stop when your computer signs out of a domain or leaves the network.
Services that respond to these events are using windows service triggers — a powerful feature designed to conserve your computer’s precious resources. Service triggers were introduced in Windows 7 and Server 2008 R2.
And here is the point of this journey into triggers: A service that has at least one trigger will show up with the “Trigger Start” designation in the Services application.
(Note that the treatment of triggers in the Services application stops there. Despite indicating when a service contains a trigger, triggers cannot be changed in the Services application. You must use the SC command line utility or our free Service Trigger Editor GUI to add or remove triggers from a service.)
Putting it all together…
Automatic (Trigger Start) means:
This service will start automatically at boot. It may also start or stop in response to specific operating system events.
Manual (Trigger Start) means:
This service will NOT start automatically at boot. It may start or stop in response to specific operating system events.
Hope this makes sense! Please be sure to get in touch if you have any other questions about the wonderful world of Windows Services.
How to manually trigger Windows 10 Update on your PC or Laptop
Last Updated on March 27, 2020 by Amar Ilindra 1 Comment
On 29th July 2015, Microsoft officially started rolling Windows 10 Update for few people in the first phase. They claimed, not everyone will get the update immediately. If you are the one who didn’t received the update yet, don’t worry, we can manually update our PC or laptop to Windows 10. We are just doing a small trick that will start downloading the Windows 10 update immediately. You must have already reserved your copy of Windows 10 earlier to make this trick work on your machine.
How Windows 10 Update actually works in background?
Before applying this trick, you must know the real fact behind Windows 10 Update and what happens after updating to Windows 10.
On July 21, Everyone who reserved for Windows 10 update received a mail from Microsoft saying that they are rolling the update in an organized way to meet the high demand. Once your device get’s the update, all files are downloaded automatically in the background and you’ll get a notification to install the update after downloading.
This mail clearly says, we need to wait till we get our chance. Why don’t we manually trigger a command which starts downloading the update even before our turn. Yes, it’s possible! This is completely safe and no need to worry about anything.
It usually takes about 30-60 minutes to install the update depending on your system configuration. Latest devices may install it in less than 20 minutes. So, keep your patience.
Method 1:
Here to make the people even more luckier, we are proving two methods to force start the Windows 10 update manually without waiting.
Manually start downloading Windows 10 Update
This trick only works if your device satisfies the following conditions:
- Windows 10 update is reserved already
- Automatic Updates must be turned on. (Click Here to know how)
- It don’t work, if you are using Windows 8. (upgrade to Windows 8.1 first)
- Install all pending updates in Windows updates (Recommended)
- Turn On Automatic Updates. (Very Important)
So, how to do the trick? Here is a simple step by step tutorial to manually download and install Windows 10 update.
Step 1 – Deleting files
Go to My Computer -> C: drive -> Windows -> SoftwareDistribution -> Download or type C:WindowsSoftwareDistributionDownload in RUN.
Now delete all the files and folders if there is any. You can ignore this step, if you installed all available updates.
Step 2 – Command Promt
Opem Command Promt as administrator. If you don’t know how, check here.
Just type the following line wuauclt.exe /updatenow (don’t hit Enter now) . Minimize the CMD window.
Step 3 – Windows update
Open Windows Update either from control panel or by using search box and click “Check for Updates”. It will now start checking for the available updates.
Step 4 – Actual Trick
As soon as you hit check for updates, open the previously minimized cmd windows and hit Enter.
Now, your Windows 10 update will start downloading in the background and you will receive a notification to install the update very soon.
Video Tutorial
Method 2
This is a alternative for first method, this trick is completely automatic and does the almost same what we explained in above method.
- Download Windows creation tool – 32 bit | 64 bit
- Double click the downloaded .exe file, Click Next and follow the on-screen instructions.
This is a 3 GB update, so it takes time depending on your internet connection speed. Let us know if you found any difficulties while updating to Windows 10 manually. If you are using pirated version of windows, you can activate it using these product keys for windows 10.