Does InstallUtil automatically register .dlls for you?

163 Views Asked by At

I am transitioning from a PowerShell script to a C# Console App executing InstallUtil.exe via Process()class to silently install a windows service.

In the PowerShell script I had to register each .dll the service uses with regsvr32.exe

Does the InstallUtil.exe automatically register the needed .dlls by examining the passed assembly for a list of the .dlls and then register them?

I read through the following link, but it did not mention .dlls:

https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool

1

There are 1 best solutions below

0
Bruce B Wilson On

I found the answer through testing (yes the .dlls are automatically registered).

  1. I uninstalled the service.
  2. I manually ran regsvr32 /u to confirm the .dlls were unregistered.
  3. I ran the install ConsoleApp that runs InstallUtil.exe
  4. The service was installed and started up correctly.