Reply to Thread

Post a reply to the thread: Batch Register .DLLs

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 12-24-2014, 03:13 AM
    linder

    Re: Batch Register .DLLs

    Perfect! Thank YOU !!!

    Friedrich
  • 12-23-2014, 10:31 AM
    klmag

    Re: Batch Register .DLLs

    Implemented and tested perfectly with Handle File Listing. Great documentation in the .chm!

    Thanks!
  • 12-23-2014, 09:34 AM
    linder

    Re: Batch Register .DLLs

    Hello,

    The main problem is that cd "%DirectoryToFolderWithDLLs%" && for %i in (*.dll) do regsvr32.exe %i /s is not a valid command at all. The Windows APIs can't "process" it. Running a shell interpreter and Windows APIs are completely different animals.

    What about 1) writing a small batch.bat file and then simply call that batch file from within your installer?

    Another option 2) would be to use native Windows APIs functionality. For example, use the "Handle File Listing..." script function to build the list of DLLs to register. Then simply Loop through the list of files and let "Register File Operation..." register all your DLLs.

    Both 1) and 2) should work fine.

    Does this help?

    Friedrich
  • 12-23-2014, 08:41 AM
    klmag

    Batch Register .DLLs

    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. 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?

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •