Thought of the Day

“A goal is a dream with a deadline.”

Napoleon Hill

Total Pageviews

Tuesday, December 11, 2012

Killing a Windows service stuck in the STOP_PENDING state

Killing a Windows service stuck in the STOP_PENDING state


I ran into this issue when I attempted to restart the AdaptiveLogExporterService


Find below the steps to kill and restart pending service.


Example

C:\sc queryex AdaptiveLogExporterService



SERVICE_NAME: AdaptiveLogExporterService

TYPE : 10 WIN32_OWN_PROCESS

STATE : 3 STOP_PENDING

(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)

SERVICE_EXIT_CODE : 0 (0x0)

CHECKPOINT : 0x2

WAIT_HINT : 0x1388

PID : 1124

FLAGS :

C:\taskkill /PID 1124 /F

SUCCESS: The process with PID 1124 has been terminated.

C:\sc start AdaptiveLogExporterService



SERVICE_NAME: AdaptiveLogExporterService

TYPE : 10 WIN32_OWN_PROCESS

STATE : 2 START_PENDING

(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))



WIN32_EXIT_CODE : 0 (0x0)

SERVICE_EXIT_CODE : 0 (0x0)

CHECKPOINT : 0x0

WAIT_HINT : 0x1388

PID : 4228

FLAGS :





SERVICE_NAME: AdaptiveLogExporterService

TYPE : 10 WIN32_OWN_PROCESS

STATE : 4 RUNNING

(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))

WIN32_EXIT_CODE : 0 (0x0)

SERVICE_EXIT_CODE : 0 (0x0)

CHECKPOINT : 0x0

IPSEC fails to start with Error 2: The system cannot find the file specified

IPSEC fails to start with Error 2: The system cannot find the file specified


Upon rebooting a Terminal Server that had resource issues, we could not log back into the server through RDP. We could log in through iLO, and it was apparent that the logins were working but they were very slow. Upon examining the services, we could see that the IPSEC service was not started.

Trying to manually start the service gave the following popup: "Could not start the IPSEC Services service on Local Computer. Error 2: The system cannot find the file specified." The event logs also showed that TCP/IP was in blocking mode.

Disabling the service and rebooting restored all network communication, but trying to start the service would drop all connectivity again and slow down the server. I found another article that said that IPSEC may need to be rebuilt. When I looked for the registry keys for IPSEC, they were not there. After I ran the following commands, the registry keys were populated, and IPSEC was able to run properly.

To rebuild IPSEC, follow these steps:

1. Click Start, click Run, type regedit, and then click OK.

2. In Registry Editor, locate and then click the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\IPsec\Policy\Local. (In my case, the server’s registry ended before IPsec. If this is the case, skip to step 6.)

3. On the Edit menu, click Delete.

4. Click Yes to confirm that you want to delete the subkey

5. Quit Registry Editor

6. Click Start, click Run, type regsvr32 polstore.dll, and then click OK.

http://support.microsoft.com/kb/912023

How can I tell if the Microsoft sysprep utility has successfully run on a Windows

How can I tell if the Microsoft sysprep utility has successfully run on a Windows Vista* operating system?




Solution



The easiest way to determine whether or not Sysprep has run is to check the following registry location on the client machine:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State.



In this location there will be an ImageState string value. If this value shows as IMAGE_STATE_COMPLETE, Sysprep has run successfully. If any other value is shown, sysprep has not run or has not run successfully.



Another option is to look for the unattend.xml file in C:\Windows\System32\Sysprep. (Sysprep comes installed by default in Windows Vista.) If this file has a current date and timestamp then there's a chance this file was updated during the imaging process. However, the first option is ultimately the best choice.

Step by Step Guide to Extend C drive on Windows 2000/XP/Vista with Acronis DD

Step by Step Guide to Extend C drive on Windows 2000/XP/Vista with Acronis DD


Suppose we have four partitions C: 10 gb, E: 40gb, F: 60gb G: 48gb. We need to redistribute the free space 10gb on F: to C:. We will shrink the F: to be 50gb and then move the unallocated 10gb next to C: drive and then we will extend the c drive with the unallocated 10gb.

Acronis offers the most stable and confidence while resizing the existing partitions. Acronis Disk Director Suite can resize, move, split, merge partitions without data loss. If you want to merge partitions, you can follow this tutorial: How to merge partitions to extend boot partition.

Here are the steps:

• You can download free copy of Acronis Disk Director Suite.

• Check the partition space in disk management before we use Acronis Disk Director Suite.



Run Acronis Disk Director Suite and choose the “Manual Mode”, the right click F: to resize



Put the cursor to the left part of F: and prepare to drag F: to shrink.



Resize F to produce 10gb unallocated space and then click OK.



Right click E to move.



Click unallocated space and then click “Next”to move E to the right part of the unallocated space.



It will automatically move E to the right part of the unallocated space and then click OK.



We can see the unallocated space is next to the C partition.



Right click C: drive to claim the unallocated 10gb.



Put the cursor to the right part of the C drive and prepare to claim the unallocated 10gb.



Drag C to the end of the allocated space to extend boot partition and then click OK.



Click the flag to commit all the operations to extend the c drive.



Click “Proceed” to confirm all the operations.



Operations are completed.



Check the extended C drive in disk management.



Followers