Failed To Load Dll Installutil Service

  1. Installutil Download
  2. Failed To Load Dll Installutil Service Code
  3. Error 0x80040702 Failed To Load Dll

File name: 'file:// server path file.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the.NET Framework. DLL ('dynamic link library') files such as InstallUtil.resources.BR.dll are small programs, similar to EXE ('executable') files, which allow multiple software programs to share the same functionality (eg. For example, let's say you are running Windows and editing a document in Microsoft Word.

30 Apr 2013CPOL

Introduction

This article provides a simple explanation of how to install a DLL into the Global Assembley Cache (GAC).

There are several reasons you might want to do this:

Sharing and Versioning the Assembly

The assembly may be used by more than one application and more than one version of the assembly may be required. Multiple versions can sit side-by-side in the GAC.

Security

The GAC is held in the system root so is likely to be more secure out-the-box. You also don't have to secure it multiple places.

Assembly Searching

The GAC is checked after the local folder and before probing and checking the codebase information.

Getting Started

Create a strong name key pair:

Firstly we need to create a strong name key file. This will be in the format: sn –k <filename and location>. An example is shown below. This creates a file containing a publicprivate key pair.

Sign the assembly via Visual Studio

Signing the assembly is very easy - you could do it the hard way using an assembly linker but why would you? Right click on the project and go to properties. Select the signing tab then select the ‘sign the assembly’ check box. Point to the key pair file you created above. In this example I have copied the key file into the bindebug folder and I am using it to sign a ReportingUtilities DLL which is generated in the same folder.

Installing into the GAC

Now that we have a signed assembly we can install it into the GAC. Run the Visual Studio command prompt (in visual studio tools) and write the following instruction in the format: gacutil –I <assembly name >. In this example I have changed the cmd prompt directory to the location of the DLL - you can do this or put the full assembly path in the assembly name.

Install into the GAC via an MSI

In a production environment the reality is that you won’t have visual studio installed.

Not to worry. To install a DLL into the GAC is still quite easy - you just need to create a deployment project.

In Visual Studio add a deployment project to your visual studio solution.

  • Choose a standard set up program – not wizard.
  • Right click on the project, select view, file system
  • Right click on the File System on target machine and select GAC
  • Right click on the generated GAC folder and select the primary output from the DLL project as shown below. Make sure you select the correct project from the drop down!

The project will also add a launch condition for the .NET framework. Make sure this version is set to the version that is going to be on the target machine as it will default to the latest version on your development machine (which might be greater).

To change this version:

Acrobat
  • Right click on the project and select launch conditions
  • In the launch conditions select the .Net Framework
  • Click the properties tab. You may need to reselect the launch condition to highlight the correct properties. It should look like so:

You can now build your project and copy the files to the environment where you need to install the DLL.

Active1 year, 4 months ago

How do I uninstall a .NET Windows Service, if the service files does not exists anymore?

I installed a .NET Windows Service using InstallUtil. I have since deleted the files but forgot to run

first. So the service is still listed in the Services MMC.

Do I have to go into the registry? Or is there a better way?

gztomas
9931 gold badge12 silver badges34 bronze badges
Thomas JespersenThomas Jespersen
5,42311 gold badges40 silver badges51 bronze badges

13 Answers

You have at least three options. I have presented them in order of usage preference.

Method 1 - You can use the SC tool (Sc.exe) included in the Resource Kit. (included with Windows 7/8)

Open a Command Prompt and enter

Tool help snippet follows:

Method 2 - use delserv

Download and use delserv command line utility. This is a legacy tool developed for Windows 2000. In current Window XP boxes this was superseded by sc described in method 1.

Method 3 - manually delete registry entries (Note that this backfires in Windows 7/8)

Windows services are registered under the following registry key.

Search for the sub-key with the service name under referred key and delete it. (and you might need to restart to remove completely the service from the Services list)

RockScience
7,11118 gold badges63 silver badges102 bronze badges
Jorge FerreiraJorge Ferreira
77.8k23 gold badges104 silver badges128 bronze badges

From the command prompt, use the Windows 'sc.exe' utility. You will run something like this:

Dean HillDean Hill
3,5496 gold badges25 silver badges34 bronze badges

Notes on using 'sc delete' in Windows 8:

1) Open a CMD window with elevated privileges. [Windows Key-X to bring up a menu with the option; select 'Command Prompt (Admin)'.]
2) Use the parenthetical name from the list in Services [for example, I used 'sc delete gupdate' when, in Services, it read 'Google Update (gupdate)']

MichaelMichael

Some people mentioning sc delete as an answer. This is how I did it, but it took me a while to find the <service-name> parameter.

The command sc query type= service (note, it's very particular with formatting, the space before 'service' is necessary) will output a list of Windows services installed, complete with their qualified name to be used with sc delete <service-name> command.

The list is quite long so you may consider piping the output to a text file (i.e. >> C:test.txt) and then searching through that.

The SERVICE_NAME is the one to use with sc delete <service-name> command.

Ian Kemp
18.4k12 gold badges77 silver badges104 bronze badges
Failed to load dll installutil service name
Robin FrenchRobin French

Remove Windows Service via Registry

Its very easy to remove a service from registry if you know the right path. Here is how I did that:

  1. Run Regedit or Regedt32

  2. Go to the registry entry 'HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services'

  3. Look for the service that you want delete and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

Delete Windows Service via Command Window

Alternatively, you can also use command prompt and delete a service using following command:

sc delete

You can also create service by using following command

sc create 'MorganTechService' binpath= 'C:Program FilesMorganTechSPacemyservice.exe'

Note: You may have to reboot the system to get the list updated in service manager.

Brad Larson
163k44 gold badges369 silver badges546 bronze badges
kombshkombsh
4,1932 gold badges33 silver badges39 bronze badges

If you wish to use a tool for it you could use Process Hacker

Form to create the service:

Context menu on a service to delete it:

I find Process Hacker a more convient tool to manage Windows processes and services than Windows's own Taskmgr.exe. Especially on Windows XP, where you can't access services at all from task manager.

Mike de KlerkMike de Klerk
6,9306 gold badges34 silver badges58 bronze badges

I needed to reinstall my tomcat service, which meant first removing it. This worked for me:

(edit the file t.txt, search through the list and find the tomcat service. It's called Tomcat7)

HOWEVER, the query command did not work the first time, because the tomcat service was not running. It seems to only list services that are running. I had to start the service and run the query command again.

user1208639user1208639

If the original Service .InstallLog and .InstallState files are still in the folder, you can try reinstalling the executable to replace the files, then use InstallUtil /u, then uninstall the program. It's a bit convoluted, but worked in a particular instance for me.

ja928ja928

You can try running Autoruns, which would save you from having to edit the registry by hand. This is especially useful when you don't have the needed permissions.

TanTan

1st Step : Move to the Directory where your service is present

Command : cd c:xxxyyyservice

2nd Step : Enter the below command

Command : C:WindowsMicrosoft.NETFrameworkv4.0.30319InstallUtil.exe service.exe u

Here service.exe is your service exe and u will uninstall the service. you'll see 'The uninstall has completed' message.

Installutil Download

If you wanna install a service, Remove u in the above command which will install your service

SreeSree

We discovered that even if you run sc_delete, there can be an entry remaining in the registry for your service, so that reinstalling the service results in a corrupted set of registry entries (they don't match). What we did was to regedit and remove this leftover entry by hand.

Note: ShipmunkService is still showing up after sc_delete!

Then you can reinstall, and your service will run correctly. Best of luck to you all, and may the force be with you.

barclaybarclay
2,6587 gold badges40 silver badges63 bronze badges

You can uninstall your windows service by command prompt also just write this piece of command

Amarjit Singh ChaudharyAmarjit Singh Chaudhary

-Windows+r open cmd.

-sc YourSeviceName this code remove your service.

-Uninstal 'YourService Path' this code uninstall your service.

Ayse ÖzbekAyse Özbek

Failed To Load Dll Installutil Service Code

protected by CommunityApr 11 '18 at 2:10

Error 0x80040702 Failed To Load Dll

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged windowswindows-servicesinstaller or ask your own question.

Comments are closed.