

Save the script as install.ps1remember to replace the YourFile.

This powershell script gets the current location of itself and assumes the YourFile.dll to be next to it, in case the dll is in some remote location update the script to replace $publish.GacInstall((Get-Location).Path + "\YourFile.dll") with $publish.GacInstall("path to \YourFile.dll") $publish.GacInstall((Get-Location).Path + "\YourFile.dll") ::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

Click on Start> Run and type ' regsvr32 nameofdll.dll ' and press the Enter key. Download it and copy it in:' C:\Windows\System32 '.
Type the following command in the command window and hit Enter - regsvr32In absence of the GacUtil.exe you can use the powershell script below Set-location (Get-Location).Path Go to the Search window and type cmd, right click on Command Prompt and choose Run as an administrator option. Save this as install.bat and call it with a parameter like install abcd.dll the %1 will receive the parameter as text and will serve Gacutil as gacutil /if abcd.dll, the /if here forces to install the dll thus updating it in case it already available. Use the following *.bat to install or update DLL to GAC using GacUtil.exe within the visual studio developer command prompt OFF
