One of my windows 2008 didn’t come after reboot. Upon checking the console, saw a message stating “Please wait for the Windows Modules Installer.”. Had to bring up the server at the earliest. It took about an hour, tried reset but server was getting back on to same page. Application team was eagerly waiting for it to come back. Started looking for alternative methods to bring it up.
When checking server was pinging and able to shared folders. Hence, connected to the server from services.msc using the option “Connect to another computer..”
Disabled “Windows Module Installer” service and restarted the server.
Bang, server was back on its home page.
Thanks,
WintelAdmin
I do not like to wait; who does? So, getting a ten-minute delay logging into
VM’s with the message “Please Wait for the Windows Modules Installer” was
frustrating. There is a way to speed
this up, and that is what this post is about.
In this post and accompanying video, I show you how to bypass this
message when creating a custom image, including with Azure Image Builder.
First, let’s consider what is happening. The message occurs during the first login
after deploying a custom image prepared with Sysprep. The “Please Wait for the Windows Modules
Installer” message does not indicate an error; it is scanning the system and installing
any required drivers.
If, however, the image is coming from the same hypervisor it
is deployed to, say Hyper-V, for example, there is a way to tell it to use the
same system configuration as the source for any VM’s created from the
image. this is done during the Sysprep on
the image source bypassing the /Mode:VM switch.
The /Mode:VM switch tells Sysprep that the image is for VM’s
on the same hypervisor. Sysprep sets the
image to use the same system settings, bypassing the scan that causes the “Please
Wait for the Windows Module Installer.
The /Mode:VM command is passed as a command-line
argument. As you can see by the Sysprep
GUI below, there is no option for /Mode:VM in the Sysprep interface.
There are a few things to know when using the /Mode:VM
switch. The switch does not work with
all other Sysprep options. Below is the list
of options supported with /Mode:VM:
/generalize
/oobe
/reboot
/shutdown
/quit
Also, the /Mode:VM option is only available for Virtual
machine images, and the image should only be used on the same hypervisor. Use the /Mode:VM switch for Hyper-V, VMWare,
Azure, AWS or any other hypervisor, but do not use the same image across different
hypervisors.
To run the command interactively to generalize and shut down
a computer to prepare it for an image, run the command below:
%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe /mode:vm
Azure Image Builder
If using Azure Image Builder, the process is a little different. Image Builder uses a script called DeprovisioningScript.ps1, located at the root of the C:\ drive that runs the Sysprep command during the image build process.
For more information on Azure Image Builder, check out my video series located here.
The Sysprep command used for the image build includes the /oobe
/generalize /quiet and /quit options.
To use the /Mode:VM option, that file is updated during the
build process to change the Sysprep command to use /oobe /generalize /mode:vm and
/quit. Notice that /quiet is not
included because that option is not available when using the /Mode:VM
option. Also, the /Shutdown command is
not used. Image Builder will take care
of the shutdown process.
Now, the question becomes how to update this file to include
the new Sysprep options. It is possible
to create an updated DeprovisoningScript.ps1 file, download the file to the build
VM with other install media, and then copy it to the C:\ drive, overwriting the
existing file. Or you could use a script
file to replace that line of text in the file with the updated command.
For this example, I
add a PowerShell customizer in the deployment template. The code runs an inline command to replace
the existing Sysprep.exe options with new options. The chuck of JSON code used to update the
file is below. Insert this in the
customizer section to edit the Sysprep command with the new options.
{ "type": "PowerShell", "runElevated": true, "name": "DeprovisioningScript", "inline": [ "((Get-Content -path C:\DeprovisioningScript.ps1 -Raw) -replace 'Sysprep.exe /oobe /generalize /quiet /quit','Sysprep.exe /oobe /generalize /quit /mode:vm' ) | Set-Content -Path C:\DeprovisioningScript.ps1" ] },
I hope that helps speed up the process of deploying VM’s
with custom images!
One of our Windows Server 2008 servers got stuck after rebooting displaying the following message:
Please wait for the Windows Modules Installer
We have tried to wait for a couple of hours, but the Windows just couldn’t proceed to the login screen. Luckily we were able to connect to the server admin share and have noticed that the system drive went out of free disk space. After the cleanup and forced restart of the server, the problem was still here.
To solve this we had to open services.msc console and remotely connect to this server.
Scroll down to Windows Modules Installer Service and set the startup type to Disabled. Click Apply and restart the server.
Your server should be back online and you should be able to login to the server. Unfortunately, once you set the startup type for Windows Modules Installer service to Automatic and restart the server, you’ll be experiencing the same problem again.
This is not a permanent solution but rather a temporary fix to get the crucial server back online.
If I manage to find a complete solution for this issue, this article will be updated.
In Windows 11/10, you can enable or disable Windows Optional Features like Hyper-V, Virtual Machine Platform, Containers, Media Features, etc., using the Windows Features window. However, some users have reported that when they open it, the Turn Windows features on or off window is stuck on Please wait message. Even after waiting for some minutes, the screen remains as it is. Because of this, the list of optional features is not loaded, and users can’t enable/disable any of those features. If you also face this issue, then the fixes covered in this article will surely be helpful.
If the Turn Windows features on or off window is stuck on displaying the Please wait message, then use the following fixes. Before using these fixes, you should run System File Checker and see if it solves the problem. If not, use these fixes:
- Use the DISM tool
- Enable Windows Modules Installer service
- Turn on or off a Windows Feature using Command Prompt
- Troubleshoot in Clean Boot State
- Clean install Windows from USB.
Let’s check all these fixes in detail.
1] Use the DISM tool
This is one of the best solutions as some users are able to solve this issue with this fix. The DISM tool (Deployment Image Servicing and Management) is a built-in command line tool of Windows 11/10 OS. If the Windows image and/or Windows Component Store is corrupted and that is causing this issue, then the DISM tool can help you repair the Windows system image and Windows Component Store. So, open Command Prompt as administrator, and run the DISM tool with the following commands one by one:
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /RestoreHealth
Here, the first command scans the Windows image for corruption, the second one detects the corruption (if any), and the third command will repair the image. The entire process may take some time. Once done, restart your system, and then open the Windows Features window. It should now display all the features.
2] Enable Windows Modules Installer service
This fix worked for me personally. Windows Modules Installer service is used to enable the installation, removal, and modification of optional components and Windows updates. What I find is when the Startup type of this service is disabled, then the Turn Windows features on or off screen gets stuck to Please wait message. Even though the service status is showing as running, the problem may continue. So, you need to enable the Windows Modules Installer service if it is disabled. Here are the steps:
- Type services in the Windows 11/10 Search box and use the Enter key
- In the Services window, look for the Windows Modules Installer service on the right section, and double-click on it
- The Properties box of this service will open with the General tab. Press the Start button if the service is stopped
- Open the Startup type drop-down menu and select the Automatic option
- Press the Apply button and OK button
- Restart File Explorer if needed.
You might also need to restart your PC. After that, you can open the Windows Features window and optional features can be accessed and used.
Related: Turn Windows Features on or off is not working
3] Turn on or off a Windows Feature using Command Prompt
You can also use the DISM tool with the Command Prompt window to turn on/off a Windows feature for the time being if the Turn Windows features on or off screen is stuck on showing the Please wait message. For this, follow these steps:
- Open an elevated Command Prompt window
- Execute the following command to get a list of available Windows features along with their Feature Name and State (Enabled or Disabled)
Dism /online /Get-Features
- To enable a feature (along with its parent features), you need to execute a command with enable parameter and Feature Name of the optional feature. So, your command would be:
Dism /online /Enable-Feature /FeatureName:EnterFeatureNameHere /All
- If a feature doesn’t have parent features, then you don’t need to add the /All in the command. Now, for example, if you want to enable the Virtual Machine Platform feature, then the command is:
Dism /online /Enable-Feature /FeatureName:VirtualMachinePlatform
- It may take a few minutes to enable a feature. Once it is done, restart your PC.
You have to enter the exact feature name otherwise the command won’t work. In this way, you can enable more Windows optional features.
Later, when you need to disable or turn off a feature, execute the command with disable parameter and feature name. The command would be:
Dism /online /DisableFeature /FeatureName:EnterFeatureNameHere
Replace EnterFeatureNameHere with the actual name of the feature and your command will be successful.
4] Troubleshoot in Clean Boot State
If this problem is caused by some third-party application or non-Microsoft service, then you need to identify that culprit and take the action. For that, you need to troubleshoot in the Clean Boot state. This will be a lengthy process but worth trying.
First of all, you have to open the System Configuration window and disable all the other services except the Microsoft services using the Services tab. Also, disable Startup items. Next, restart your Windows 11/10 PC in a clean boot environment.
If everything is good and you are able to use the Windows Features window and turn on or off the optional features, then definitely there is some third-party startup item or service that is causing the issue.
Now what you need to do is systematically turn on and off Startup items and services, restart your computer, and open Windows Features unless it is stuck in the Please wait screen again. If after turning on a particular non-Microsoft service or Startup item, the Turn Windows features on or off screen is stuck on Please wait, then that is the culprit causing the problem. Disable or remove that item from your system and your problem will be resolved.
After that, you can restart your system in regular mode, open the System Configuration window, and turn on the other services that you disabled for troubleshooting. Also, enable the Startup items, and restart your Windows 11/10 system.
5] Clean install Windows from USB
If the above fixes don’t help, then there could be a problem with Windows itself. In that case, you should clean install your Windows PC from USB. One of the affected users fixed this problem with this solution. So, you might also have to do the same. Before trying this fix, restore your computer to an earlier state using a system restore point (if available). If that doesn’t work, then clean install Windows would be the last solution to use.
How do I fix Windows stuck on Please wait screen?
If your Windows PC is stuck on the Please wait screen, then stop Windows Error Reporting Service, Network Location Awareness, and Network List Service from running, and then set their Startup type to Disabled so that these services won’t start automatically. If the problem is not solved, then force the Automatic Startup Repair process or perform System Restore.
Why is my PC stuck on Welcome screen?
If the Desktop Window Manager (or DWM) is not able to finish loading the user interface, then your PC may get stuck on Welcome Screen. While this issue is temporary, if Windows is stuck on the Welcome screen for a long time, then boot into Advanced Recovery mode and perform System Restore. In addition, you can boot into safe mode, and run the SFC scan and Chkdsk command from there using CMD. You can also try to force Automatic Repair or Reset Windows to solve the issue.
Read next: Fix Error 0x80070002 when adding Windows Features.