klmag
12-23-2014, 09:41 AM
I have a folder with 130 .DLLs and I'm trying to register all of them with a simple call to command line but it isn't working due to the syntax, and I'm surprised I couldn't find this question anywhere on the forums using the search function.
Take a look here (https://www.simple-talk.com/blogs/2005/11/23/wild-card-registering-com-dlls/). In my project I have:
Run Command Line cd "%DirectoryToFolderWithDLLs%" && for %i in (*.dll) do regsvr32.exe %i /s
However I get a:
error GEN1006: Reference to variable %i in (*.dll) do regsvr32.exe % has not been previously defined.
Running this in command prompt, works fine, where && concats the two commands to be sent to the same command line session. I couldn't find whether or not there is an escape character I could use so the %i doesn't get processed as a compiler variable.
Since these files are already installed, and not a part of this installer--I broke a previous installer, oops!--, Install File with SelfReg isn't an option.
Maybe there is a better way to do this?
Take a look here (https://www.simple-talk.com/blogs/2005/11/23/wild-card-registering-com-dlls/). In my project I have:
Run Command Line cd "%DirectoryToFolderWithDLLs%" && for %i in (*.dll) do regsvr32.exe %i /s
However I get a:
error GEN1006: Reference to variable %i in (*.dll) do regsvr32.exe % has not been previously defined.
Running this in command prompt, works fine, where && concats the two commands to be sent to the same command line session. I couldn't find whether or not there is an escape character I could use so the %i doesn't get processed as a compiler variable.
Since these files are already installed, and not a part of this installer--I broke a previous installer, oops!--, Install File with SelfReg isn't an option.
Maybe there is a better way to do this?