none
GACUTIL.exe in different folders in different desktops? RRS feed

  • Question

  • Hi I am trying to register a com dll into more than 500 computers. I am installing the dll using a batch file. BUt when I tried to run the batch file I found that the gacutil.exe is installed in different locations in the case of different computers. For example if it is installed inside framework folder for one , in another case it will be inside Microsoft SDK folder, for another one it is inside Visual Studio folder.

    I would like to create a single batch file for instaling the dll in all computers. Please help. 

    Wednesday, August 4, 2010 12:35 PM

Answers

  • Hi,

    One option you have is to tweak the PATH environment setting in you batch file. You could add all paths that you know of that could have the GacUtil.exe to the PATH setting. Just store the current PATH setting in a temporary environment variable PATHTEMP and then tweak the PATH like so:

    set PATHTEMP = PATH
    set PATH = %PATH%; <path1>; <path2>;

    And at the end of your batch file you could set the following:

    set PATH = %PATHTEMP%
    set PATHTEMP=

    That should do the trick.

    Hope this helps.
    Meile Zetstra


    http://blogger.xs4all.nl/mzetstra

    • Marked as answer by SamAgain Thursday, August 12, 2010 9:27 AM
    Wednesday, August 4, 2010 1:21 PM

All replies

  • Hi,

    One option you have is to tweak the PATH environment setting in you batch file. You could add all paths that you know of that could have the GacUtil.exe to the PATH setting. Just store the current PATH setting in a temporary environment variable PATHTEMP and then tweak the PATH like so:

    set PATHTEMP = PATH
    set PATH = %PATH%; <path1>; <path2>;

    And at the end of your batch file you could set the following:

    set PATH = %PATHTEMP%
    set PATHTEMP=

    That should do the trick.

    Hope this helps.
    Meile Zetstra


    http://blogger.xs4all.nl/mzetstra

    • Marked as answer by SamAgain Thursday, August 12, 2010 9:27 AM
    Wednesday, August 4, 2010 1:21 PM
  • Maybe you mis-spoke, but GacUtil.exe does not register COM Dlls. It will install the Dll in the GAC, but if you literally mean that you want to register a COM Dll then you need RegAsm.exe.
    Phil Wilson
    Wednesday, August 4, 2010 9:36 PM
  • I want to do both.. Want to register it and also have to install it in GAC

    Thursday, August 5, 2010 9:34 AM