- Практическое руководство. Установка и удаление служб Windows How to: Install and uninstall Windows services
- Установка с помощью программы InstallUtil.exe Install using InstallUtil.exe utility
- Удаление с помощью служебной программы InstallUtil.exe Uninstall using InstallUtil.exe utility
- Установка с помощью PowerShell Install using PowerShell
- Удаление с помощью PowerShell Uninstall using PowerShell
- How to Check for and Install Windows Updates
- Check for Updates in Windows 10, 8, 7, Vista and XP
- What to Know
- How to Check for and Install Windows Updates
- Check for and Install Updates in Windows 10
- Check for and Install Updates in Windows 8, 7, and Vista
- Check for and Install Updates in Windows XP, 2000, ME, and 98
- More on Installing Windows Updates
- How to Check if a Windows Update (KB) is Installed on your Computer?
- Find if a Windows Update KB has been applied
- How to Check if a Windows Update (KB) is Installed on your Computer
- Method 1: Check the Windows Update history
- Method 2: View installed updates in Programs and Features Control Panel
- Method 3: Using DISM command
- Method 4: Run the KB update installer (.msu) file again.
- Method 5: Using WinUpdatesList or WinUpdatesView utility from NirSoft
- WinUpdatesView (Windows Updates History Viewer)
- Method 6: Using WMI command-line
- Method 7: Check the Windows Update CBS Registry Entries
- Determine the install date & time of an update using registry
Практическое руководство. Установка и удаление служб Windows How to: Install and uninstall Windows services
Если вы разрабатываете службу Windows с помощью .NET Framework, вы можете быстро установить приложение службы с помощью служебной программы командной строки InstallUtil.exe или PowerShell. If you’re developing a Windows service with the .NET Framework, you can quickly install your service app by using the InstallUtil.exe command-line utility or PowerShell. Если вы являетесь разработчиком и хотите создать службу Windows, которую пользователи могут устанавливать и удалять, можно использовать набор инструментов WiX или коммерческие средства, такие как Advanced Installer, InstallShield или другие. Developers who want to release a Windows service that users can install and uninstall can use the free WiX Toolset or commercial tools like Advanced Installer, InstallShield, or others. См. сведения о создании пакета установщика (классическое приложение Windows). For more information, see Create an installer package (Windows desktop).
Если вы хотите удалить службу на своем компьютере, не выполняйте процедуру, описанную в этой статье. If you want to uninstall a service from your computer, don’t follow the steps in this article. Вместо этого определите, какая программа (или программный пакет) установила эту службу, а затем выберите Приложения в параметрах, чтобы удалить эту программу. Instead, find out which program or software package installed the service, and then choose Apps in Settings to uninstall that program. Следует отметить, что многие службы являются составной частью ОС Windows. Если их удалить, это может привести к нестабильной работе системы. Note that many services are integral parts of Windows; if you remove them, you might cause system instability.
Чтобы использовать процедуру, описанную в этой статье, сначала необходимо добавить установщик службы в свою службу Windows. To use the steps in this article, you first need to add a service installer to your Windows service. Дополнительные сведения см. в разделе Пошаговое руководство: создание диспетчера служб Windows. For more information, see Walkthrough: Creating a Windows service app.
Проекты служб Windows нельзя запускать непосредственно из среды разработки Visual Studio путем нажатия клавиши F5. You can’t run Windows service projects directly from the Visual Studio development environment by pressing F5. Перед запуском проекта необходимо установить службу в проекте. Before you can run the project, you must install the service in the project.
Запустите обозреватель сервера и убедитесь, что служба установлена или удалена. You can use Server Explorer to verify that you’ve installed or uninstalled your service.
Установка с помощью программы InstallUtil.exe Install using InstallUtil.exe utility
В меню Пуск выберите каталог Visual Studio и затем Командная строка разработчика для VS . From the Start menu, select the Visual Studio directory, then select Developer Command Prompt for VS .
Появится командная строка разработчика для Visual Studio. The Developer Command Prompt for Visual Studio appears.
Откройте каталог, где находится скомпилированный исполняемый файл вашего проекта. Access the directory where your project’s compiled executable file is located.
Запустите InstallUtil.exe из командной строки, указав исполняемый файл проекта в качестве параметра: Run InstallUtil.exe from the command prompt with your project’s executable as a parameter:
Если вы используете командную строку разработчика для Visual Studio, системный путь должен указывать на файл InstallUtil.exe. If you’re using the Developer Command Prompt for Visual Studio, InstallUtil.exe should be on the system path. Если это не так, можно добавить его в путь или использовать полный путь для его вызова. Otherwise, you can add it to the path, or use the fully qualified path to invoke it. Этот инструмент устанавливается вместе с платформой .NET Framework в папку %WINDIR%\Microsoft.NET\Framework[64]\ . This tool is installed with the .NET Framework in %WINDIR%\Microsoft.NET\Framework[64]\ .
Пример: For example:
- Для 32-разрядной версии .NET Framework 4 или 4.5 и более поздних версий: если каталог установки Windows — C:\Windows, по умолчанию используется путь C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe. For the 32-bit version of the .NET Framework 4 or 4.5 and later, if your Windows installation directory is C:\Windows, the default path is C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.
- Для 64-разрядной версии .NET Framework 4 или 4.5 и более поздних версий: по умолчанию используется путь C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe. For the 64-bit version of the .NET Framework 4 or 4.5 and later, the default path is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.
Удаление с помощью служебной программы InstallUtil.exe Uninstall using InstallUtil.exe utility
В меню Пуск выберите каталог Visual Studio и затем Командная строка разработчика для VS . From the Start menu, select the Visual Studio directory, then select Developer Command Prompt for VS .
Появится командная строка разработчика для Visual Studio. The Developer Command Prompt for Visual Studio appears.
Запустите InstallUtil.exe из командной строки, указав выходные данные проекта в качестве параметра: Run InstallUtil.exe from the command prompt with your project’s output as a parameter:
После удаления исполняемого файла для службы сама служба может по-прежнему присутствовать в реестре. After the executable for a service is deleted, the service might still be present in the registry. В этом случае удалить запись службы из реестра можно с помощью команды sc delete. If that’s the case, use the command sc delete to remove the entry for the service from the registry.
Установка с помощью PowerShell Install using PowerShell
В меню Пуск выберите Каталог Windows PowerShell и Windows PowerShell. From the Start menu, select the Windows PowerShell directory, then select Windows PowerShell.
Откройте каталог, где находится скомпилированный исполняемый файл вашего проекта. Access the directory where your project’s compiled executable file is located.
Выполните командлет New-Service, указав в качестве параметров выходные данные проекта и имя службы. Run the New-Service cmdlet with the with your project’s output and a service name as parameters:
Удаление с помощью PowerShell Uninstall using PowerShell
В меню Пуск выберите Каталог Windows PowerShell и Windows PowerShell. From the Start menu, select the Windows PowerShell directory, then select Windows PowerShell.
Выполните командлет Remove-Service, указав в качестве параметра имя службы. Run the Remove-Service cmdlet with the name of your service as parameter:
После удаления исполняемого файла для службы сама служба может по-прежнему присутствовать в реестре. After the executable for a service is deleted, the service might still be present in the registry. В этом случае удалить запись службы из реестра можно с помощью команды sc delete. If that’s the case, use the command sc delete to remove the entry for the service from the registry.
How to Check for and Install Windows Updates
Check for Updates in Windows 10, 8, 7, Vista and XP
What to Know
- Checking for and installing Windows updates, like service packs or patches, is a necessary for running any Windows operating system.
- The updates can solve specific problems with Windows, provide protection from malicious attacks, or even add new features.
This article includes instructions for installing updates for Windows 10 and other editions all the way back to Windows 98.
How to Check for and Install Windows Updates
Windows updates are most easily installed using the Windows Update service. While you could certainly download updates manually from Microsoft’s servers, updating via Windows Update is considerably easier to do.
The Windows Update service has changed over the years as Microsoft released new versions of Windows. While Windows updates used to be installed by visiting the Windows Update website, newer versions of Windows include a special built-in Windows Update feature with more options.
Below is the best way to check for, and install, Windows updates based on your version of Windows. You’ll need to know which version of Windows you have to make sure you’re following the correct steps for your computer.
Check for and Install Updates in Windows 10
In Windows 10, Windows Update is found within Settings.
To get there, select the Start menu, followed by the gear/settings icon to the left. In there, choose Update & Security and then Windows Update on the left.
Check for new Windows 10 updates by choosing Check for updates.
In Windows 10, downloading and installing updates is automatic and will happen immediately after checking or, with some updates, at a time when you’re not using your computer.
Check for and Install Updates in Windows 8, 7, and Vista
In Windows 8, Windows 7, and Windows Vista, the best way to access Windows Update is via the Control Panel.
In these versions of Windows, Windows Update is included as an applet in Control Panel, complete with configuration options, update history, and lots more.
Just open Control Panel and then choose Windows Update.
Select Check for updates to check for new, uninstalled updates. Installation sometimes happens automatically or it might need to be done by you via the Install updates button, depending on what version of Windows you’re using and how you have Windows Update configured.
Microsoft no longer supports Windows 7, and as such, doesn’t release new updates. Any updates available via Windows 7’s Windows Update utility are ones that have not been installed since support ended on January 24, 2020.
Microsoft no longer supports Windows Vista, and as such, doesn’t release new updates. Any updates available via Windows Vista’s Windows Update utility are ones that have not been installed since support ended on April 11, 2017.
Check for and Install Updates in Windows XP, 2000, ME, and 98
In Windows XP and previous versions of Windows, Windows Update is available as a service hosted on Microsoft’s Windows Update website.
Similar to the Control Panel applet and Windows Update tool in newer versions of Windows, available Windows updates are listed, alongside a few simple configuration options.
Checking for, and installing, uninstalled updates is as easy as selecting those respective links and buttons on the Windows Update website.
Microsoft no longer supports Windows XP, nor versions of Windows that preceded it. While there might be Windows updates available for your Windows XP computer on the Windows Update website, any you see will be updates released prior to the end of support date for Windows XP, which was on April 8, 2014.
More on Installing Windows Updates
The Windows Update service isn’t the only way to install Windows updates. As mentioned above, updates to Windows can also be downloaded individually from Microsoft Download Center and then installed manually.
Another option is to use a free software updater program. Those tools are usually built specifically for updating non-Microsoft programs but some include a feature for downloading Windows updates.
Most of the time, Windows updates are installed automatically on Patch Tuesday, but only if Windows is configured that way. See How to Change Windows Update Settings for more on this and how to change how updates are downloaded and installed.
How to Check if a Windows Update (KB) is Installed on your Computer?
The Windows Update channel delivers all necessary updates suitable for your system. Most of the time, manual intervention is not required for installing updates. In some cases, especially during manual installation of an update using standalone installer, you may need to first check if a specific update (a prerequisite update) is installed on your system.
This article explains how to check if a specific Windows Update ( KBnnnnnn ) is installed in your computer or not.
Find if a Windows Update KB has been applied
How to Check if a Windows Update (KB) is Installed on your Computer
There are at least seven different methods to determine if an update is installed in the system.
Method 1: Check the Windows Update history
The modern Settings app has an option to view Windows update history. Here’s how to view it.
- Open Settings and click Update & Security
- Click View update history. The update history page shows the list of updates installed on your computer.
- Scroll through the list and find the specific update ( KBnnnnnn ) you’re looking for.
Editor’s note: The update history page may fail to show some updates. In my computer, the update the Servicing Stack Update (SSU) KB4470788 was not listed in the update history page even though the update was installed a few months back.
Method 2: View installed updates in Programs and Features Control Panel
Using the “Programs and Features” applet in the Control Panel, you can find the list of installed updates.
- Right-click Start, click Run.
- Type appwiz.cpl and click OK. This opens the Programs and Features in the classic Control Panel.
- Click View installed updates link in the left side. This shows you the list of updates along with the installation date column.
Note: In the classic Programs and Features applet, the Servicing Stack Update (SSU) KB4470788 is listed, and the install date showing up as Dec 07, 2018 . It appears that the “View update history” option in the modern Settings app and “Programs and Features” are using two different sources for finding the update history.
Method 3: Using DISM command
The built-in DISM tool can list out the installed Windows Update CBS packages. Follow these steps:
- Open an administrator Command Prompt window.
- Type the following command and press ENTER :
The output is redirected to clipboard (using | clip operator).
Note: The update Install Time shown by DISM may be in GMT.
Method 4: Run the KB update installer (.msu) file again.
Running the KB setup .msu again will tell you if the update has been already installed. Here is how to obtain the standalone installer from Microsoft Update Catalog and run the .msu setup file. Note that this method works for Windows update standalone installers .msu only. That is, this method doesn’t apply if you have the .cab version.
- Visit the Windows Update Catalog
- Download the update package ( .msu ) by mentioning the KB number.
- Double-click the .msu file to run the setup. The Windows Update Standalone Installer (WUSA) searches for updates on your computer and determines if the update is already installed or not.
If it’s already installed, it shows the message saying “(KBnnnnnn) is already installed on this computer.”
Method 5: Using WinUpdatesList or WinUpdatesView utility from NirSoft
The WinUpdatesList utility ( wul.exe ) from Nirsoft displays the list of all Windows updates, including Service Packs and Hotfixes installed on your local computer. You can copy the list of updates to the clipboard, or save it to text/HTML/XML file in a single click. The following fields are shown for each update listed. We’ve covered WinUpdatesList in the article How to Print Your Windows Update History By Exporting to Text or HTML File?.
Note: The WinUpdatesList utility, however, did not list the Servicing Stack Update KB4470788 on my computer. Hope this tool works well in your case.
WinUpdatesView (Windows Updates History Viewer)
WinUpdatesView is a simple tool from Nirsoft that displays the history of Windows updates on your system. WinUpdatesView can load the Windows updates history from your local system, using API, and it can also read and parse the Windows updates database file ( DataStore.edb ) from an external drive or from a remote computer on your network.
Method 6: Using WMI command-line
From an admin Command Prompt, run:
It shows the list of updates installed along with the date of installation and other details.
Or Export to HTML file, using this syntax:
Or to list a specific update, run:
Alternately, you can run the command Get-Hotfix from a PowerShell window to get the same results.
You can sort the table by the InstalledOn column in descending order by running this command:
PowerShell’s Get-HotFix cmdlet also uses the WMI’s Win32_QuickFixEngineering (QFE) class as the WMIC CLI tool above. The output is exactly the same.
The systeminfo command from a Command Prompt window also lists the hotfixes installed. It again uses the WMI QFE class to query the list of hotfixes.
Method 7: Check the Windows Update CBS Registry Entries
For each update installed, a corresponding Component Based Servicing package registry entry is created. Using the Registry Editor, you can check whether a Windows update has been installed on your computer.
- Start the Registry Editor ( regedit.exe )
- Go to the following registry key:
- Use the Find option under the Edit menu, and search for the key having the text 4470788 (to find KB4470788 related entries.)
If the key exists, you’re taken to the branch. In my case, as the update was already installed, the Find option led me to this key:
In the right-pane, check the value data for “CurrentState”. If the value data reads 0x00000070 (112) , it means that the update was successfully installed.
Here is the list of possible CurrentState registry values and their meaning:
Applicable/Current State | Hex | Dec |
---|---|---|
Absent | 0 | 0 |
Uninstall Pending | 0x5 | 5 |
Resolving | 0x10 | 16 |
Resolved | 0x20 | 32 |
Staging | 0x30 | 48 |
Staged | 0x40 | 64 |
Superseded | 0x50 | 80 |
Install Pending | 0x60 | 96 |
Partially Installed | 0x65 | 101 |
Installed | 0x70 | 112 |
Permanent | 0x80 | 128 |
Determine the install date & time of an update using registry
Each CBS Package key has two values namely InstallTimeLow & InstallTimeHigh . These keys, when decoded will show you the date and time the update was installed. However, we have a shortcut way to find the exact installation date and time the update was installed on your computer.
The trick is to export the Package branch to a .txt file (instead of .reg format) and read the timestamp mentioned in the file. We’ll find the installation date and time of update KB4470788 in this example.
- In the Registry Editor, select the following ( KB4470788 ) key:
- Right-click on the package key and click Export.
- In this example, we’ll export the Package_1_for_KB4470788
17763.164.1.1 branch.
The last write time denotes the date and time the registry entry was created.
As you can see, the last write time in this example matches with the date and time we determined in Method 2 using “Programs and Features”.
That’s it! Hope this article helped you check if a specific Windows Update (KBnnnnnn) has been applied to your system or not.