Service Marked For Deletion 1072

6 views
Skip to first unread message

Curtis Boykins

unread,
Jul 31, 2024, 8:24:54 AM7/31/24
to dieconmike

In my case, it worked after closing the Services window and verifying that the service had no processes open. Check if the Services.msc window is open. If so, close it. Then check the Task Manager to see if the service in question has any processes running. If so, kill them by right clicking on each one and choosing "End Task" from the context menu.

service marked for deletion 1072


Download File 🔗 https://fenlaekdiaho.blogspot.com/?mu=2zVf7i



Closing the services console as suggested by a few of the answers here did allow me to remove the service. In my scenario this was only a short term fix since all subsequent reinstalls and removal of the service would require me to take these additional steps. Reviewing my web.config file, it was discovered that there was an error that once fixed, allowed me to easily remove the service without the additional closing of the services console step.

That means the service is still listed as disabled in services.msc.Just close the services.msc and re open as administrator...The service will not be listed. Now, install the service using the command,

Discovered one more thing to check - look in Task manager - if other users are connected to this box, even if they are 'disconnected' you have to actually sign them out to get the service to finally delete.

While on Windows 7 it just spawns another process, it is now checking whether the service process is still around and may return ERROR_SERVICE_MARKED_FOR_DELETE (1072) for any subsequent call to CreateService/DeleteService even if the service appears to be stopped.

The reason a service process is still around after it already has reported its SERVICE_STOPPED state isn't surprising. It's a regular process, whose main thread is 'stuck' in its call to the StartServiceCtrlDispatcher API, so it first reacts to a stop control action, but then has to execute its remaining code sequence.

It's kind of unfortunate the SCM/OS isn't handling this properly for us.A programmatic solution is kinda simple and accurate: obtain the service executable's process handle before stopping the service, then wait for this handle to become signaled.

This is what worked for me:- I hit the same issue: my service was stuck in 'marked for deletion'.- I opened services.msc My service did show up as running, although it was already uninstalled.- I clicked Stop Received an error message, saying the service is not in a state to receive control messages. Nevertheless, the service was stopped.- Closed services.msc.- Reopened services.msc. - The service was gone (no longer showing in the list of services).

In my case, the service name was 'Monitor' which is also used by a windows service called 'Monitor', when I tried to update my services, I tried uninstalling them, the installer tried to remove the windows service 'Monitor' which it couldn't, and the installation was always rolled back.

The main reason for the error is the process is not stopped.to resolve it start task manager go to services and see if you are still able to see your service than go to the process of that service and end process. Than the issue will be solved completely.

I was having this issue when I was using Application Verifier to verify my win service. Even after I closed App Ver my service was blocked from deletion. Only removing the service from App Ver resolved the issue and service was deleted right away. Looks like some process still using your service after you tried to delete one.

Sometimes this could happen during service deletion via PowerShell remote session script, especially when you are trying to delete service several times. In this case, try to recreate a session before the deletion:

Last time I create WAS profile and WASService then I try to config and run many script for learn how to config WAS, Finally it crash so i use wasprofile delete this profile and forgot delete WASService.

I had this error also, make sure the exe the service is pointing to is stopped. Also make sure you don't have any Windows dialog boxes behind your other windows. That is why mine wasn't deleting. There was a windows message behind it saying this service has been deleted or something similar.. just had to click ok, there it went.

One situation where this can also happen is if there is some other service or application that is holding open a service handle obtained with OpenService. For example, a monitoring service that starts and stops services based on some external event can keep open handles to each of the services it monitors. In this case, uninstalling the service would leave it in the "marked for deletion" state until all handles obtained with OpenService are closed.

This test tool could have been written in C++ but at least this way, without any software such as Visual Studio to compile code you can follow along at home but still see the Windows API calls being used and it keeps everything transparent.

Checking if a service is marked for deletion is also not as simple as running a query to the SCM but thankfully it does maintain a flag in the registry we can check. This is a DWORD named DeleteFlag under the service registry key, as can be shown below:

So it is marked as deleted, fancy that. I wonder what happens if we were to try and delete the service again or try and create a service with the same name? What would SCM say about that? Lets see, I think I have an idea:

So this is why the installer gets the error when it tries to add the service back! So even if the application deleting the service went into a loop retrying, chances are it would keep getting back 1072. The only difference and benefit to doing so might be the uninstaller would have better logging, rather than waiting for the install log to fail on the creation of the service.

To gather a little more evidence and prove it offline, you could always try and run the problem application under an API monitor such as the well named tool API Monitor, with a filter for the service APIs in advapi32.dll.

The key thing to note is the call to CloseServiceHandleA, with the handle that was returned from the call to OpenServiceA. It is this CloseServiceHandleA call that is the difference between the service being able to be deleted and just marked for deletion.

The VeeamVssSupport service cannot be installed because the VeeamVSSSupport service is still present from a previous job run and is marked for deletion by the OS. The service becomes marked for deletion by the OS when the OS fails to process the service delete request that the previous job run sent.

By default, Non-Persistent Runtime Components are used by Veeam Backup & Replication when performing Application-Aware Processing. A connection is made to the Guest OS during each backup job run, and the VeeamVSSSupport service is installed. When the VM is done being processed, Veeam Backup & Replication sends a request for the VeeamVSSSupport service to be deleted.

If this issue frequently recurs for a specific VM, consider switching from Non-Persistent Runtime Components to Persistent Runtime Components. When using Persistent Runtime Components, the VeeamVSSSupport service is not removed after each job run and is left present within the Guest OS, ready for the next job run.

With "Use persistent guest agent" enabled in the job and the Veeam Installer Service installed, during the next run of the job, the VeeamVSSSupport service will be created and will not be removed after the job completes.

If the service is actually in use, when the manager asks it to shut down in preparation for deletion it will respond with "unable to shut down now, in use" and the manager will return this error to SC. This can happen if a process starts a session with the service but does not ever actually close that session - possibly because it crashed, possibly because it's still running in the background. The only way I've found to deal with this in any Windows variant is to reboot the system.

Starting guest agent
Cannot register management service. Service name: [VeeamVssSupport].
Cannot create service. Machine: []. Service name: [VeeamVssSupport].
Service binary path: [C:\WINDOWS\VeeamVssSupport\VeeamGuestAgent.exe].
Service account: [].
Cannot create service.
Win32 error: The specified service has been marked for deletion.
Code: 1072

How to solve this?
My first idea was, open the Registry Editor and remove the service entry. Unfortunately that did not work. Some blog posts advice similar actions, all without result. The official Microsoft approach is to reboot the server. Because the affected service has been marked for deletion, it was gone after the reboot.

Thank you for your feedback. Concerning your question, is the error message identical? The service should not be running, because it will only run during the backup. As soon as the backup finishes, the service is removed.

Veeam error code 1072 is related to Volume Shadow Copy Service (VSS) issues on your Windows VM or physical machine. The error message indicates that the VSS writer component has been marked for deletion and cannot be used.

Just a vague idea: Do you stop the service using the services mmc
snap-in? this often keeps a handle open to services you otherwise delete
and those services are then marked for deletion. An alternative would be
to use the command line with net start/stop or sc.exe.--
Stefan

Try to enter some keywords on the "Search" tab in the local copy (the .chm.file). If there are no related pages, try to read about the principles, features, simple usage rules, typical usage examples and frequently asked questions. After that, you may have additional keywords to search for.

VAC is a "passive" tool. It is not a self-sufficient application that you could simply run and show a window. This is determined by the design of Windows audio subsystem, not by an arbitrary choice of the developer.

The main purpose of VAC is to create virtual audio devices for you. You can use these devices with almost any audio application by selecting the appropriate endpoints in their audio settings. VAC cannot work standalone, with no audio applications (or system components) connected.

93ddb68554
Reply all
Reply to author
Forward
0 new messages